Question

Before hosting WCF Restful Services on IIS. I was getting response from server in my android application but now I have hosted my services on IIS but getting an error message of REQUEST ERROR. I don't know what's went wrong. can someone please sort out my problem. Thanks in Advance

Before Hosting on IIS

enter image description here

the above picture is before hosting the service on IIS. and the yellow highlighted text is param and the JSON is the response which is corresponding to that param.

After Hosting on IIS

enter image description here

I don't know why I'm getting this error. what went wrong and how to fix that. now im trying to retrieving data correspond to that param but getting an error message.

"SERVER LOG after includeexceptiondetailInfaults attribute value to true"

I'ms sure that database is causing the error and you can view the picture of server log below

enter image description here

Was it helpful?

Solution

The database was causing an error. I have found the solution. what we need to do? We need to add a login to SQL Server for IIS APPPOOL\ASP.NET v4.0 and grant permissions to the database.

In SQL Server Management, under the server, expand Security, then right click the Logins and select "New Login...".

In the New Login dialog, enter the app pool as the login name and click "OK"

enter image description here now right click the login, select properties and then click on the User Mapping Option. Click the appropriate DATABASE and check the properties roles. And we are done :).

hope you good luck. Thanks

OTHER TIPS

Possible solutions would be,

(i)Just ensure all your property are public.

(ii)To So see more details about the issue, you need to includeexceptiondetailInfaults attribute to true in servicedebug tag.

<servicebehaviors>
        <behavior name="myServiceBehavior">
          <servicedebug includeexceptiondetailinfaults="true" />
        </behavior>
</servicebehaviors>

(iii)Remove the Enum types (or use their suggested work-around and use a wrapper around the enum properties) and this should go away.

(iv)Copy the connection strings from the class library app.config to the web project web.config If you are using a class library and a web project,

After hosting on iis Request error occurred in iis The server encountered on request error see server logs for more details Solution In your sql server change window authentic to sql authentic with username and password
and change on connection string After changing these step and refresh the iis and Your problem is solved

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top