Is there any one who can point me in the right direction?
When hosting my Blazor Client Side application to IIS the signalr is not working.
In visual studio with IIS express it work as expected.
I did setup IIS and deployed the application as indicated in the Microsoft documents.
There is no console errors and the hub returns status code 200 when hosting in IIS.
Thank you in advance
Websocket support is not enabled by default on IIS. It was introduced in IIS 8, and has to be enabled from windows' optional features: https://learn.microsoft.com/en-us/iis/get-started/whats-new-in-iis-8/iis-80-websocket-protocol-support
Optional features -> IIS -> WWW services -> App Dev Features -> Websocket protocol
Disclaimer: I found this after asking a question about this myself, so I copied my answer from there: https://stackoverflow.com/a/61411666/4364057
Related
I'm curious upon running on my web application in IIS Express I saw a double localhost in Browse Applications. Please refer to the screenshot provided. I just want to know why it suddenly appears two localhost, is not normal or anyone can explain why? This is a newly created project.
Most likely you enabled SSL, by entering to your “Project Properties” and setting “SSL Enabled = True”. IIS Express will then host your application on both protocols.
I have simple ASP.Net web app in which there is Socket connection implementation.
It is working in local IIS Server, but not working when deployed on Azure.
Source Code on GitHub.
It is working in local IIS Server, but not working when deployed on Azure.
I previously followed this tutorial to build my web application with WebSockets. Per my understanding, you need to enable the Web sockets option under the "SETTINGS > Application settings" of your Azure web App on Azure Portal. Moreover, here is a similar tutorial about Introduction to WebSockets on Windows Azure Web Sites, you could refer to it.
UPDATE:
For using SSL for WebSockets under Azure Web Apps, you could just connect to wss://{your-appname}.azurewebsites.net (WebSockets over HTTPS). Azure Web Sites supports SSL even on free sites by using a default SSL certificate for *.azurewebsites.net. Details you could follow this tutorial.
TEST:
Additionally, if it does not work in your web app, you could leverage the Log stream under the MONITORING section of your app service on Azure Portal to retrieve the detailed error message to narrow this issue.
I should preface this by stating that my experience with IIS is very limited. I am trying to deploy a Web API service on IIS 7.5 on an Azure server running Windows Server 2008 R2 Datacenter. Whenever I post to the service using Postman I get an "HTTP verb used to access this page is not allowed" error. Looking at the response headers through fiddler I see the following line under the Miscellaneous category: "Allow: GET, HEAD, OPTIONS, TRACE".
I deployed this application using a WebDeploy package and configured it so it would be a virtual directory under the Default Web Site. My current IIS configuration is as follows:
Some of the things I've tried include:
Verifying that WebDAV is not installed
Edited the following Handler mappings for the Default Web Site and the Sync project to allow all verbs: ExtensionlessUrlHandler-Integrated-4.0, ExtensionlessUrlHandler-ISAPI-4.0_32bit, ExtensionlessUrlHandler-ISAPI-4.0_64bit, and ISAPI-dll
The default Web Site and the Sync app are both running under the DefaultAppPool which is set to .NET Framework 4.0.
The Sync App is targeting .NET framework 4.5
I've looked at Request Filtering for the Default Web Site and the Sync app and made sure that the POST verb is allowed under the HTTP Verbs section.
I am at a loss as to what to look at next so any hints are greatly appreciated.
After working with a colleague, we managed to get the web api service running to an extent. It currently shows an error message but it's one that we created which means the code is actually being hit. We had to give database permissions to the IIS_APPPOOL\DefaultAppPool user and re-register .net 4 with iis via the aspnet_regiis command.
I have a .NET 1.1 solution where all projects have been upgraded to .NET 4.0 (VS2010, Windows 7). To get past my "Unable to start debugging on the web server" problem, I switched my web application property to use VS Development Server instead of IIS.
When debugging the web application, it launches OK. But I get the above error when I hit a line where I call a web service that's local on my machine. I've seen stuff about adding useUnsafeHeaderParsing=false, but my web.config doesn't have a sytem.net section.
Is it not able to server the web service as well as the web application simultaneously on the application development server? Do I need to get it configured correctly to use IIS7? As a longtime IIS6 user, just looking at it makes my head spin... although, I do have the site and webservices set up within it, and I am fairly certain it worked at one time. Gotta love that.
This worked for me: Text below is comming from This CodePlex Post
This error usually occurs when you have set up Visual Studio to debug
an existing web application running in IIS rather than the built in
ASP.NET debug web server. IIS by default listens for web requests on
port 80. In this case, another application is already listening for
requests on port 80. Typically, the offending application is Skype,
which by default takes over listening on ports 80 and 443 when
installed. Skype is already occupy the port 80. So IIS is unable to
start.
To resolve the issue follow the steps:
- Skype -> Tools -> Options -> Advanced -> Connection:
- Uncheck "Use port 80 and 443 as alternatives for incoming connections".
Its due to Skype has taken default Port 80 or 443 and Default website is stopped.
to solve this issue, close Skype, [Start] Default Website from IIS, (and start skype again if you want.)
you might also try doing an IIS reset
I have a WCF Rest Server hosted in an ASP.net Application. It was set up using the simple RouteTable setup in global.asax. ON my development machine with IIS 7, it works perfectly, but when I deployed to A windows Server 2008 machine with similar IIS settings, it does not work, I get a 404 error when my ajax methods tries to access the service. I was wondering if WCF is able to be hosted like I have on my development machine on an actual production server? If so what must I do to get it to work.
turns out from careful googling it turned out to be a missing attribute on system.webserver modules section: runAllManagedModulesForAllRequests="true"
Source:
http://www.west-wind.com/weblog/posts/2011/Mar/27/ASPNET-Routing-not-working-on-IIS-70
In my case, it was even more simple!
The symptom was that all POST requests returned 404s.
I'd only just enabled IIS (via Programs and Features -> Turn Windows features on and off) on a new Dev machine that already had Visual Studio fully installed.
I had to enable .NET 4.5 for IIS (via C:\\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i) and then all was well.
It's confusing, because I had already set the IIS App Pool to run under .NET Framework v4.0.30319. There was no warning that I had to separately run regiis.