Reputation: 949
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
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
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
Upvotes: 1
Views: 753
Reputation: 1
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
Upvotes: -1
Reputation: 949
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"
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
Upvotes: 3
Reputation: 222722
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,
Upvotes: 0