Problems hosting a WCF service
am 20.12.2007 10:21:42 von Rahul
I have developed a pretty basic WCF server application and a client
windows application. The WCF server works as expected in the built-in
application server of VS 2k8 (final) which is my development
environment. The client can also successfully communicate with server
when the server is running on built-in app server of VS.
But I am having problems to host the application on IIS 7 in Vista.
I created a new application using "Add Application"
The virtual directory contains the "Service1.svc, Service1.svc.cs,
IService1.cs, Web.config and WCFService.dll (which is the file created
in "bin" directory after compilation.). All these files are kept in
the same folder (both in the actual project as well as in virtual
directly). App_code folder is not used.
After running Service1.svc, it throws a HTTP Error 500.19 - Internal
Server Error
Description: The requested page cannot be accessed because the related
configuration data for the page is invalid
The error appears to have occured at the section of the
configuration. But the same configuration file works properly on the
internal server. Do I need to make some changes to web.config to get
it to work on IIS?
(I apologize if this is not the correct forum. If that is the case,
please guide me to the right forum if you can).
Re: Problems hosting a WCF service
am 21.12.2007 10:07:13 von David Wang
On Dec 20, 1:21=A0am, Rahul wrote:
> I have developed a pretty basic WCF server application and a client
> windows application. The WCF server works as expected in the built-in
> application server of VS 2k8 (final) which is my development
> environment. The client can also successfully communicate with server
> when the server is running on built-in app server of VS.
>
> But I am having problems to host the application on IIS 7 in Vista.
>
> I created a new application using "Add Application"
>
> The virtual directory contains the "Service1.svc, Service1.svc.cs,
> IService1.cs, Web.config and WCFService.dll (which is the file created
> in "bin" directory after compilation.). All these files are kept in
> the same folder (both in the actual project as well as in virtual
> directly). App_code folder is not used.
>
> After running Service1.svc, it throws a HTTP Error 500.19 - Internal
> Server Error
>
> Description: The requested page cannot be accessed because the related
> configuration data for the page is invalid
>
> The error appears to have occured at the section of the
> configuration. But the same configuration file works properly on the
> internal server. Do I need to make some changes to web.config to get
> it to work on IIS?
>
> (I apologize if this is not the correct forum. If that is the case,
> please guide me to the right forum if you can).
I do not believe the internal server of VS2008 is IIS, so the fact
that it works gives no assurance that it works on the real IIS server.
Please provide the contents of the section in the
web.config file of your application. It looks like it is wrong.
//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//