Web Service

G

Guest

Hi all,

I am trying to create a webservice using C#,visual studio 2005.For
that i am following the steps as follows..

File menu-->New-->Web Site-->ASP.NET Web Service.
Location:-->http://localhost/Webservice1
Language-->Visual C#

after OK is pressed i get the following message,

Configuring Web site "http://localhost/Webservice1" to ASP.NET 2.0
failed.You may need to manually configure this site for ASP.NET 2.0 in order
for your site to run correctly.

Please any one give me a suggestion to solve this problem.

Thanks in advance.
Adarsh
 
P

Peter Bradley

FWIW, I always leave the location at its default setting (File system). It
works fine for me.

I also always create a blank solution first and then add a Web service to
it - again leaving the location at the default value.

HTH


Peter
 
G

Guest

1. Run inetmgr from Start/Run
2. On the MMC window left pane, navigate to (local computer)/Web
Sites/Default Web Site
3. Right click on WebSerivce1 and click Properties
4. Select ASP.NET tab
5. Select 2.0.50727 (.NET 2.0 f/w) for ASP.NET Version drop-down and click OK

HTH
 
G

Guest

Thanks Shiva you helped me to solve that problem.But i have one more problem

Now I am able to create the web service successfully, I have a doubt after
creating the web service, need we to debug it?
After creating the web service I created the C# windows application, and
Added my the web service that I created.(Referencesright clickAdd web
references, and giving the URL of the web
service(ex;http://localhost/MyWs1/service.asmx).But it gives the error as
shown below, How to solve this problem?

************************************************************************
Server Error in '/MyWS1' Application.
________________________________________
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to
access IIS metabase.

The process account used to run ASP.NET must have read access to the IIS
metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase
permissions, please see http://support.microsoft.com/?kbid=267904.

Source Error:
An unhandled exception was generated during the execution of the current web
request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below.

Stack Trace:

[HostingEnvironmentException: Failed to access IIS metabase.]
System.Web.Configuration.MetabaseServerConfig.MapPathCaching(String
siteID, VirtualPath path) +3492186

System.Web.Configuration.MetabaseServerConfig.System.Web.Configuration.IConfigMapPath.MapPath(String siteID, VirtualPath vpath) +9
System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath
virtualPath, Boolean permitNull) +163
System.Web.CachedPathData.GetConfigPathData(String configPath) +382
System.Web.CachedPathData.GetConfigPathData(String configPath) +243
System.Web.CachedPathData.GetApplicationPathData() +68
System.Web.CachedPathData.GetVirtualPathData(VirtualPath virtualPath,
Boolean permitPathsOutsideApp) +3385695
System.Web.Configuration.RuntimeConfig.GetLKGRuntimeConfig(VirtualPath
path) +189
________________________________________
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET
Version:2.0.50727.42

Thanks in Advance
Adarsh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top