SignalR hosted on iis works not stable - c#

I have a problem with signalr 2.2 hosted on iis 7.5 and windows server 2008r2. The problem is when I use my code on widows 7 and iis express signalr methods works perfect, but when I hosted in on this configuration sometimes methods works, but sometimes not. I can't detect any lows of that behavior. I use asp.net mvc3 with .net 4.5.1
Maybe somebody has such issues with signalR?
The application is simply chat with sending text messages.
Thanks!

Related

I can self host a REST server in WCF. Can I also self host a full asp.net application?

.NET 4.5/4.6, Visual Studio 2015, Windows Server 2016
I see here, and elsewhere, that to self host (e.g. in an exe, without using IIS) a REST service, I can do that no problem. We like this because it simplifies deployment to get IIS out of the picture.
I also have a large asp.net application.
The question: Can I move the big asp.net app into a self hosted WCF application also? (for the same reason, to move to xcopy deploy and get IIS out of the picture).
No you can not self host ASP.Net web application built using .Net framework, you can host it only using IIS server. Though if your application is built using .Net Core framework, you might be able to self host it.

What is the difference between IIS and Visual Studio IIS in Web Requests?

I am trying to run a custom site on IIS with ASP.NET whih connects to a site on the internet which is a coding community via HttpWebRequest.
If I use the Visual Studio built-in Development Server it successfully runs and shows the result of the Request.
But as soon as I use the local IIS for running the application I get an error saying that the site (which I am trying to connect to) is refusing the connection.
But there has nothing changed right? I have not changed my code at all!
EDIT: My understanding is that the IIS and VIsual Studio's "On-The-Run" IIS are in base the same. But why are they acting so different here?
Web applications in a production environment are hosted using Microsoft's IIS web server software. In the development environment, however, the application may be hosted using IIS or the ASP.NET Development Server. Ideally, the same web server software should be used in both environments because using different software adds another variable in the mix. However, the ease of use of the ASP.NET Development Server makes it an attractive choice in the development environment. The good news is that there are only a few fundamental differences between IIS and the ASP.NET Development Server, and if you are aware of these differences you can take steps to help ensure that the application works and functions the same way regardless of the environment.
Visual studio uses IIS Express to host your application, which is a lightweight, self-contained version of IIS. It is used by developers to develop and test websites inside the same machine(localhost). The major difference between IIS and IIS express is that IIS express doesn't accept request outside the localhost. while IIS accept the web request from any another machine inside the domain. SO in order to accept request from your application you have to deploy it to IIS not IIS express.

ASP.NET RC1 web app in IIS 8.5

I have setup as per http://docs.asp.net/en/latest/publishing/iis.html IIS to allow ASP.NET 5 apps to run
I also installed ASP.NET 5 on the machine
The HTTP Platform Handler are also installed (x64)
I created an app pool with the settings like said on the docs and set the pool to no managed code
Set the site to run the app pool i created above.
The system.webServer/handlers section in web.config is unlocked
Once I access the site, the sites loads forever and nothing appears.
In the logs, I get:
Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'. Available commands: web.
I can start the application if I run the web.cmd in the approot directly.
It will start the Kestrel server and process properly.
What am I doing incorrectly?
Trying to search for the above error gets me no results.
Server is running IIS 8.5 - windows server 2012 R2 with all the updates done.
EDIT:
I am using ASP.NET 5 RC1
I am not using a virtual directory
I am not publishing to AZURE
The web.config in the wwwroot folder should help IIS figure out what you want to run. Maybe post that?
MVC 6 Windows Server 2012 R2 IIS 8.5 - Error: Unable to load application or execute command 'Microsoft.AspNet.Server.Kestrel'
The solution as posted here but also Problems publishing asp vnext website on IIS 8
ASP 4.5 wasn't installed, to install it go to Server Manager , Add Roles and Features, Web Server IIS / Web Server / Application Development and check ASP .NET 4.5 and .NET Extensibility 4.5

Always 404 error for dynamic content in IIS on localhost

I am trying to host a website on local IIS in Windows 7.
The version of IIS is 7.5. I have enabled every feature under IIS from Windows Feature.
My Web application is a ASP.NET MVC 5 application built in .NET 4.5.
I can host this application in my Windows 8 which is IIS 8.5.
Here is a screenshot if I visit home page of my web application.
And this is whenever I try to visit anything like /Home/Index
I have replicate followings as it was in my Windows 8 IIS 8.5 system.
Please help me running this site.
UPDATE
I just created a new MVC project in .NET 4.0 and hosted it on local IIS. It runs fine. Only applications targeting framework 4.5 not working. I have reinstalled .net framework 4.5 just to make sure that its not corrupted. But no luck. Isn't it that .NET 4.5 app can not run on IIS 7.5 in Windows 7
In the screen shots, have a look at the Physical Path and make sure it is the same as your website location in the file system

Cannot run ASP.NET MVC Websites on IIS7

I have Windows 7 professional running IIS7. I have installed ASP.NET MVC 1.0 and VS2008. When I run the app with Cassini it runs fine. When I create a virtual directory and run it on IIS7, the app comes up with a blank web page and no errors at all.
How do I get ASP.NET MVC projects running on IIS7?
I run with that configuration every day. There are a few steps you need to go through to be sure IIS 7.5 (on Win 7) is configured properly. Follow the instructions using the link below. Although they're meant for Vista / IIS 7, they still hold.
http://learn.iis.net/page.aspx/387/using-visual-studio-2008-with-iis-70/
Let us know the outcome.
For those interested the problem was Skype had captured port 80 so IIS could not use that port of course.
Malcolm

Categories

Resources