“Could not create type” error while browsing a web service
Hi,
You may come across below error after you deploy a web service application on IIS and try to browse the .asmx file.
Fix :-
Below are few reasons that cause this issue
- Check your Application Pool of your hosted site is of .Net Framework 2.0 or higher
- Verify all your web service methods preceded with [WebMethod] tag
- Add a Namespace tag to your web service class; (It should mostly resolve the problem)
- Go to “.asmx.cs” file and set Namespace & Name
- ‘Name’ value should match with your class name; In my case its “MyService”
[WebService(Namespace = “MyDomain”, Name = “MyService“)]
public MyService TelefonicService : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return “Hello World”;
}
}
- Clean, rebuild and deploy the web service
Below is a useful article that talks about the same issue
Hope it helps 🙂
Categories: Misc
browse web service, Could not create type, deploy web service, wbemethod, webservice
Comments (0)
Trackbacks (0)
Leave a comment
Trackback