WCF set up on iis - wcf

I'm getting the following error when I try to browse a web service that i added on IIS 7.
When I go to content view i can browse the end points."HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory".
If it is related to giving user permissions to an III user, how do I go about doing that?

This just means you have tried to browse the WCF service without the service file.
You need to browse to MyService.svc, for example, not just to the directory that contains it.

Related

Blazor WASM Deploy to IIS Object reference not set to an instance of an object

I developed a Balzor WASM and it works on local machine with bellow structure :
But when I deploy to IIS it show me this error :
{"error":"Object reference not set to an instance of an object."}
It is very strange that has no any http 500 error in debug mode but when I hosted on IIS it shows me this error.
There is no any additional information in page or event viewer!
Another thing is I host both release and debug files on IIS. I shows me this message again!
Anyone can help me?
The error seems to be json and is strange that is on your index page of the WASM client.
The only possibility I can think is a request from your index.hrml to your backend but there's a problem of configuration.
Check your endpoint base address in your appsettings.json in your wwwroot of the client app.
Try to use postman (or another client like it) to test calls to your backend when hosted on IIS.

Asp.net Core iis Error 401.2 - Unauthorized

I have followed this article to create a web.api site on my IIS. But I am getting Error 401.2 - Unauthorized. The site has anonymous access enabled, so I not sure where else should I look. Running dotnet command from the command prompt using my dll as a parameter works fine.
After messing around with the configuration I was able to get it to work.
I had to put an specifc user in the anonymous access.

Error on adding a service reference to use web-centric WCF service?

I am trying to follow a textbook learning how to create a web-sentric WCF service project. I created the service, and see the corresponding folder under Default Web Site on IIS. I can even browse the folder (localhost/EmployeeService/) and see the contents in the browser. Now I want to make a client, i.e. a simple Console application. When I am trying to add a Service Reference, after I enter the address, I get an error:
There was an error downloading 'http://localhost/EmployeeService/$metadata'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/EmployeeService/'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
Could you please explain? I saw some questions about the same error, but could not find a solution for myself.
Thanks.
In order to invoke the service, you must point at the service file. Otherwise the web server doesn't know what you're trying to do.
Add the .svc file to your URL to do that, so http://localhost/EmployeeService/YourService.svc.
You can also have it fileless, see How can I host a WCF service without an SVC file in IIS.

Setting IIS to play mpeg dash

I trying to setup a website to play mpeg dash(.mpd) file using IIS 6. I have created a website in IIS and trying to access it via the below web address.
http://xx.xxx.xx.xx/MPEG-DASH/scifi_trailer
But its giving me the below error:
HTTP Error 404.0 - Not Found The resource you are looking for has been
removed, had its name changed, or is temporarily unavailable. Detailed
Error Information Module IIS Web Core Notification MapRequestHandler
Handler StaticFile Error Code 0x80070002 Requested
URL http://xx.xxx.xx.xx:80/MPEG-DASH/scifi_trailer Physical
Path C:\inetpub\wwwroot\MPEG-DASH\scifi_trailer Logon Method Anonymous
Logon User Anonymous
Any help on why i'm facing this issue?
Thanks,
Johm
You need to add in the right mime type into IIS.
See https://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/cd72c0dc-c5b8-42e4-96c2-b3c656f99ead.mspx?mfr=true
You can find the correct details for the mime type from
http://www.sitepoint.com/web-foundations/mime-types-complete-list/

IIS6.0 - ASP.NET 4.0 - Default Content Page throwing Error message 401.2

We have a .NET application that was recently converted to .NET 4.0 and then published to IIS 6.0. When we trying going to the url without a page www.blahblahblah.com we get the following error:
Server Error in '/' Application.
Access is denied. Description: An
error occurred while accessing the
resources required to serve this
request. The server may not be
configured for access to the requested
URL.
Error message 401.2.: Unauthorized:
Logon failed due to server
configuration. Verify that you have
permission to view this directory or
page based on the credentials you
supplied and the authentication
methods enabled on the Web server.
Contact the Web server's administrator
for additional assistance.
We have IIS 6.0 site setup with a default content page going to "default.aspx". However, it seems IIS is not getting to the point of forwarding the url to this page. If we navigate directly to www.blahblahblah.com/default.aspx the page comes up with not issue and we all other functionality of the application works. If we roll back to the 3.5 version, the default page forwarding works as it should. Does anyone have any idea what is causing this?
I found the issue. Someone had put this (see below) in the authorization tag which prevented access to the website as a whole preventing IIS from forwarding to the default page, even though the page default.aspx had a location exception that allowed all users.
<authorization>
<deny users="*"/>
</authorization>