Configure IIS 7.0 to enable webservices in classic mode - web-services

What are the configuration file settings to enable webservices on IIS 7.0 in classic mode?
The site has to be in a classic mode application pool because the Report Viewer controls crash when running in Integrated Mode. However in a classic mode application pool, webservices produce the following error message:
The requested content appears to be
script and will not be served by the
static file handler.
•If you want to serve this content as
a static file, add an explicit MIME
map
EDIT - Additional Error Message Info:
HTTP Error 404.17 - Not Found
Module: StaticFileModule
Notification: ExecuteRequestHandler
Handler: StaticFile
Error Code: 0x80070032
Note: This particular instance of the application will be running in a customers account on a shared hosting enviroment so access to IIS UI is not/will not be available. Specifically seeking configuration file adjustments.

In IIS Manager (Start -> Run -> inetmgr), select the website or virtual directory you want to set to classic mode.
In the right hand panel "Actions", click on "Basic Settings".
Next to application pool (that is defaulted to DefaultAppPool), click "Select" and change it to "Classic .Net AppPool".
Walkthrough is here.
Update: Sorry, I misread your question. There are a couple of things you can try:
The first is to double check the IIS installation features from the control panel (Programs and Features -> Turn Windows Features on and off -> Internet Information Services -> World Wide Web Services -> Application Development Features). I have everything bar CGI and Server-side includes checked).
Secondly, make sure that your site is correctly setup as an application (select website -> Actions -> View Applications). If it isn't there you'll need to add it.
Third thing to check is specifically the Handlers, which is accessed through IIS Manager -> Select website -> Handler Mappings -> Open Feature -> Make sure .asmx is there. I have it three times, WebServiceHandlerFactory-Integrated (handler System.Web.Handlers.WebAdminHandler), WebServiceHandlerFactory-ISAPI-2.0 (Isapi Module), and WebServiceHandlerFactory-ISAPI-2.0-64 (Isapi Module).
Finally you make sure you are using the correct .NET version for that application.
Again, apologies for the original duff answer.

Thanks Junto for the post! I tried so many things that other people were suggested but couldn't get my site to work. I followed your instructions and sure enough, my applications were listed under Sites in IIS, but were not shown in the Application Pools. I deleted the Applications and created them. Everything work as expected after that.
In case someone is interested of what I went through. I was migrating from IIS6 to IIS7. All the virtual directories and applications seem to be ported fine, but not all of them got into the Application Pools. So, if you're running into the same issue, "Error 400.17. If you want to serve this content as a static file, add an explicit MIME map", check your App Pool to make sure all your applications are shown.

This sounds like your HandlerMappings are a bit screwy. You can revert to known good a baseline (provided you haven't tinkered with the server wide Handler Mappings) by doing:
Open IIS Manager
Open the site in question
In the Features View for the site open the Handler Mappings feature
In the Actions pane (top right), click on "Revert To Parent"

Related

404 On existing .svc file

I have an IIS site on a Windows 2012 R2 server. The site has an Application inside it:
The URL for this site is setup on our Active Directive servers as it is only accessible internally from our company. The URL follows the following structure:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local
The service for this site is placed in an internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
I have placed a number of test files both at the root level and in the internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/HelloWorld.html
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/HelloWorld.html
I can browse these files without any problems. However, I cannot browse the service at http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
The browser returns
However the file is there, and I have made sure there are no typos in the URL I put in the browser.
I have looked at similar questions but there seems not to be anything like the problem I am experiencing. The only question that looked promising was:
WCF service file not visible
But the answer for that post does not apply to my issue as I already have the configuration mentioned in that post setup as it is suggested.
I have checked the IIS-level config files for any exclusion regarding .svc files or anything similar, but could not find anyhting.
Have you got any suggestions on where to look at to solve this issue?
Solution: Install HTTP Activation feature
After running some more testing on other sites on the same server, I actually realised that the issue was specific to .svc files. I therefore made another search on Google and found that the server was missing the "HTTP Activation" feature (part of the WCF Services).
So, if you are having the same issue on .svc files follow the following steps to make sure you have the right components installed on the server:
Open Server Manager
In Server Manager, click the Manage menu, and then click Add Roles
and Features
In the Add Roles and Features wizard, click Next. Select the
installation type and click Next. Select the destination server and
click Next.
Skip the Server Roles page.
On the Select features page, expand ".Net Framework 4.5 Features",
expand "WCF Services" and select "HTTP Activation". Click Next.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
The same can be achieved by running the following Powershell command:
Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
This did the trick for me. I hope it can be of help to someone.

Accessing web service from another system using ipaddress

I have a website working. I run it and i see localhost/pagename.aspx up and running. I replace it with my ip address and the port number like this .. ://10.xxx.xxx.xx:12234/pagename.aspx and it does not work. If I use 127.0.0.1,it works.The thing is this web site has an asmx web service. I need access to it. I disabled my firewall.I also added inbound and outbound rule for the port 12234. I allowed on both times. But still cannot see. What am I doing wrong?Is there any other way I can get access? (Some research told me to go to IIS and do some setting changes there. It was not that clear). More questions coming. Thanks.
I want you to follow this tutorial.
I will give you a few steps too.
Go to the iis manager and create a new application pool with the .net framework set to v4.0. Also note that the framework of the application/service that you are going to use is also the same framework.
Publish your web application/ service into a folder in you file system with publishing profile as "File System".
Copy the folder (that you just published) into C:\inetpub\wwwroot (which is the default folder).
Open iis manager and refresh the default site and the new folder that you just copied into the C:\inetpub\wwwroot folder will appear.
Right click that folder and click convert to application.
Right Click again and click -> manage application -> Advanced setting. Find and change the application pool from Default to the new pool that you just created.
Enable directory browsing which is on the middle pane.
On the left pane, click "rowse *:80 (http)"
the browser will open and you can see the application/service running.
http://localhost/something/ will be your default value on the address bar.
changing it to 192.168.1.85/something will also give you the same result. The same can be accessed from any computer in the same network with the ip address your system
192.168.1.85 was my system's ip address. run command prompt and type in ipconfig and you can find your ip address.

Post installation styles are missing on the sitecore login and content editor pages

I did an installation of sitecore on one of a dev server and copied over the site root folder to a bunch of dev machines. This process worked fine on 6 of the 7 machines and we can see the sitecore login and content editor pages fine and browse to the site through IIS.
On one of the machines on browsing to site / sitecore in the browser we are not seeing any of the styles come through. After logging in same is the case with the content editor.
I did a comparison of the web config on the server and one of the dev machines with the machine which has the issue and cannot spot any differences. Also did a comparison of IIS settings for the site on with the server IIS settings and couldn't find any difference.
Anyone has any suggestions on what could be wrong or what can be done next to troubleshoot the issue?
Using sitecore 6.5 on windows 7 as the dev machine.
FIXED: Went to IIS->sites->SiteName. On the right under IIS, Authentication. Right click Anonymous Authentication, make sure it is enabled and change the anonymous user identity to Application pool identity. Recycle app pool. Should be all set.
Looks like the "Static Content" feature isn't enabled for IIS. You can check it in the "Turn Windows features on or off", "Internet Information Services", "Worlds Wide Web Services", "Common HTTP Features".
If the feature is installed, check the issue with Fiddler - look at the status code and content that all .css requests return.

Coldfusion 9 installation problem with IIS7

Windows web server 2008 R2 64 bit, CF9 64 bit, IIS7, ISAPI extensions and filters and II6 metabase compatability installed. OS is on C default, and trying to install CF to D:
Testing IIS and it shows index.html correctly from c:\inetpub\wwwroot at http://localhost/index.html
Then I install CF to D:\ , single standard server licence, select run with all IIS sites, select C:\inetpub\wwwroot as the web root for administrator, and when it gets to the bit where it is supposed to open up administrator to complete the installation it opens up the browser with a 500 error.
Now when I go back to http://localhost/index.html I also get a 500 error, if i uninstall CF I can again reach the html page.
CFIDE has been installed in C:\inetpub\wwwroot presumably correctly. Can anyone tell me where I'm going wrong please.
Update
The exact IIS error is
HTTP Error 500.0 - Internal Server Error
The page cannot be displayed because an internal server error has occurred.
Module IsapiModule
Notification ExecuteRequestHandler
Handler AboMapperCustom-28262
Error Code 0x800700c1
Requested URL http://127.0.0.1:80/test.htm
Physical Path C:\inetpub\wwwroot\test.htm
Logon Method Anonymous
Logon User Anonymous
Resolves as below
There is a setting Enable 32-Bit Applications under Application Pool>Advanced settings. Set this to True and you will gain access to your CFIDE>Administrator page.
I would suggest first trying a restart. It is one of those things that after the fact sounds so obvious, but you never think of it. I know I have had problems with installing CF under IIS and had to restart the server to get it running.
I'm humiliated to admit it, but the problem was that what I thought was the cf9 64 bit installer, was the 32 bit one.
# Dave and # CfSimplicity many thanks for your help and in particular the IIS user account stuff was new learning for me.
Try checking the file system permissions for this folder:
D:\ColdFusion9\runtime\lib\wsconfig
The account that IIS uses needs Read, Execute and Modify permissions on this folder and below.
It might be because of two problems.
1) you haven't installed CGI, ISAPI extensions and ISAPI filters aren't installed yet in Web Server (IIS) of Server manager.
Window 2008 R2 with Coldfusion
2) you need to enable 32 bit application at IIS7.
Internal 500 error CF9 on Window 2008
I tried a different approach with my Windows 7 Home Premium - See http://coldfusioner.blogspot.com/2011/12/fix-number-1-installing-64-bit.html
It seems that I was successful by using the IIS Connector batch scripts manually and then to create a second default web site after installing the handlers. My article link above shows the steps I took - a very raw article and will likely be refined as I hear from others how they adapted my approach. The important thing is that this worked ;>) I hope it helps others...
The problem could be that your Application Pool that is part of your default website. It is possible to set it to run 32 bit applications. Try setting the Enable32bit to false in the defaultapppool of your IIS server, restart the app pool and your www service itself. Then try to use the ColdFusion wsconfig tool to add the IIS mapping. It should work even without the cf 9 updater 1 being installed on the server.
​To avoid a 500 error when accessing the Administration console for the first time when installaing ColdFusion 9 on a Windows 2008 server with IIS 7.5 installed, include the "IIS_IUSRS" user group with "Full Control" to the \Lib\wsconfig folder in Enterprise server or \runtime\lib\wsconfig folder in Standard server. Before starting the ColdFusion install, make sure the "IIS 6 Management Compatibility" functions are installed, especially the "IIS 6 Metabase Compatibility" function.
Assuming that you use the default installation paths (C:\JRun4 for Enterprise or C:\ColdFusion9 for Standard), here is a step-by-step approach:
Begin the ColdFusion installer as an Administrator. At the completion of the initial installation process, but before accessing the online Administration console, do the following:
1.) At the Start Menu, select "Computer"
2.) In the Enterprise install, go to C:\JRun4\lib. For the Standard install, go to C:\ColdFusion9\runtime\lib.
3.) Right-click "wsconfig" and select "Properties" to open the wsconfig properties dialog box.
4.) Click the "Security" tab.
5.) Click "Edit" to change permissions for that folder.
6.) Click "Add..." to add a new user/group.
7.) Enter "IIS_IUSRS" in the Object name field and click OK to return to the Permissions dialog box.
8.) In the permissions dialog box, ensure that the "IIS_IUSRS" group is highlighted and click "Full Control" in the "Allow" column, then click "OK" to close the dialog box. Ensure that the permissions change will affect all files and folders under wsconfig.
9.) Click "OK" to close the wsconfig properties box.
Return to the ColdFusion installer wizard and continue the installation by clicking the open ColdFusion Administrator link. If the settings are correct, after a minute or two, a web browser with the ColdFusion Administrator Console should appear so you can complete the installation.

How to config IIS in Windows XP SP2

new to IIS. I have two questions:
After installing IIS, I straightly wen to my browser and typed in http://127.0.0.1. But a user name and password dialog box pops up and I have no idea what to type in. Why IIS asks this information? How can I remove this asking.
I want to put a web service under IIS. The web service is written in C# under .net. Is there any tutorial for this config? I found a tutorial but it is under windows server 2003 and there is an option called web service extension. However, I installed IIS in XP and the UI seems completely different.
FYI, the IIS Management tool I used tells me that it is version 5.
Thank you very much for the help.
[FYI, the question #1 is the kind that is typically better addressed on serverfault.com, I'll answer it as well since it is bundled...]
To resolve 1), i.e. to allow anonymous access to the web site
- Open the IIS management console
Either from Computer management Console, in 'Aervices and Applications'
+ 'Internet Information Service'
or from the control panel + Administrative tools
+ 'Internet Information Service'
- On right pane, navigate to 'Web Sites' + 'Default Web Site'
- Right Click, select 'Properties' in menu.
This brings a squarish dialog with 2 rows of 4 tabs each at the top.
- Select 'Directory Security' tab
- then in the top group named 'Anonymous Access and authentication control',
click 'Edit'
- The dialog that comes up is where you need to check the Anonymous access,
and enter the account credentials for the account which IIS will use, on
behalf of the anonymous users. I recommend you create one account for
this purpose, rather than using yours or some other actual user.
Now, concering 2) i.e. to deploy the web service itself
I think you just need to copy the asmx file into the location where you want the web service to run, and the binary files (dlls) to the bin directory. In other words its just like publishing a regular .NET web app, except that the files (referenced in the URI) are named *.asmx. (you can also make this file the default file for the dirctory).
This of course implies that .NET would be installed on thie machine, adn allowed to work (see the '.NET Application" tab of the web properties dialog.
A final bit of advice: You probably will want to install this webservices in its own Web Site (or Web application) and own directory. Refer to serverfault.com for more detail about this type of tasks. There are very many settings, some of which have repercussion on security or performance --> let the pros tell you ;-)