简体   繁体   中英

launching a web service (.asmx) in a IIS 6.0

I have developed a web service with the .asmx extension using C# and i want to deploy this into my VPS which has Windows Server 2003 with IIS 6.

Service is running with Framework 4.0 and it's installed in the VPS also. When I upload the precompiled version into the VPS it shows a runtime error

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

 <configuration> <system.web> <customErrors mode="Off"/> </system.web> </configuration> 

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

 <configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web> 

can anyone help me on this?

Update

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to >service this request. Please review the specific error details below and modify your >configuration file appropriately.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names >are case-sensitive.

Source Error:

Line 26: Line 27:
Line 28: Line 29: Line 30: Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

Source File: C:\\Inetpub\\vhosts\\akashvahini.com\\httpdocs\\web.config
Line: 28

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053

this is the new error message after enabling debugging in the web.config

You should enable debugging to diagnose the problem.
Microsoft has a very detailed explanation on how to enable detailed debugging over here .

Server Error in '/' Application.

That error is too generic, check the output after you enabled debugging and post the results.
And don't forget to disable debugging after your site goes live.

Update :
Seems to be permission related:
http://forums.iis.net/p/1042369/1454379.aspx
The ASPNET user account needs permissions for the folder that contains your asmx service.

Update2 : You can give the ASPNET user permissions using the file system permission dialog:
http://www.asp.net/learn/whitepapers/denied-access-to-iis-directories

Might look different on newer versions of Windows.

From my experience "Server Application Unavailable" means that you have got web sites that use different versions of .net in the same application pool.

the site that hosts your webservice needs to be in an app pool that only has .net 4.0 web sites. The application pool is configured on the Home Directory tab in the web site properties.

Looks to me like the application pool is trying to run two difference versions on .net.

Make a new application pool and call it something like .Net4 and then move the new site across to use this app pool and everything should work.

This error is shown by Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET >Version:2.0.50727.3053

Where the site with a .asmx should say .Microsoft .NET Framework Version:4.0 etc...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM