I am trying to host my WCF service in IIS 7.5, but everytime i run the website i get a page stating
Service Unavailable
HTTP Error 503. The service is unavailable.
I noticed that whenever I started the website the ASP.net v4.0 stopped automatically. I checked the eventviewer and this seems to be the error
The worker process for application pool 'ASP.NET v4.0' encountered an error 'Configuration file is not well-formed XML ' trying to read configuration data from file '\\?\\C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\CONFIG\\web.config', line number '0'. The data field contains the error code.
I tried searching for solutions around the internet but none of them have been helpful so far.
I tried changing the identity of ASP.net v4.0 in IIS to LocalSystem and it didn't work
After that i tried setting up a "Custom account" by setting the username as my computer username and adding passwords but i got "The specified password is invalid, type a new password" even though i don't have any passwords for my account
3.The final thing i tried was to add IIS_IUSRS and IUSR to the security of the Web.config but still it didn't work
This is my Web.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="mexBehavior">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="mexBehavior"
name="HelloService1.HelloService1">
<endpoint address="HelloService1" binding="basicHttpBinding"
contract="HelloService1.IHelloService1" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8080" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
</configuration>
Try a re-install of the .NET Framework 4.0. Go to this location
%windir%\Microsoft.NET\Framework64\v4.0.30319
Run this command
aspnet_regiis -i
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.