开发者

The resource cannot be found. WCF .svc file

开发者 https://www.devze.com 2023-01-02 13:41 出处:网络
I am making a WCF service. System Config: Widnows 7, ASP.NET 3.5, IIS 7.0 Server Config: IIS7, ASP.NET 3.5

I am making a WCF service.

System Config: Widnows 7, ASP.NET 3.5, IIS 7.0 Server Config: IIS7, ASP.NET 3.5

It works fine on my system, but when i deploy开发者_运维问答 this on the server i get following error

The resource cannot be found.

when i try accessing my .svc file. Please help me out in this.

My server is with GoDaddy, so i have no control on the server. I have to do everything in my code only. Please help.


I had a similar issue when try to deploy my WCF rest service to Windows Server 2008 R2 x64. The interesting thing that the service works fine on Windows Server 2008 R2 x86.

After a few days digging I found that installing .NET Framework 4 update solves the issue for me.

Hope it helps someone.


You may need to add the .svc extension in your config. Check this blog Running WCF on GoDaddy


This may not be the problem in your case but the solution might help someone else.

I ran into this error message because I somehow had a virtual directory mapping that was overriding my service URL.

Ex: localhost/ServiceName/MyService.svc/ was actually mapped to an invalid location.

So when I'd try to access the actual .svc in the ServiceName folder the virtual mapping would override it and give me that error.

To fix, select "Default Web Site" (or where ever you have yours) in IIS, hit "View Applications", and remove the faulty virtual directory mapping.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号