Visual Studio 2010 local testing server stopped working - c#

Just recently I tried to build my mvc 3 project, however the local server will not load in the browser, it just says that the web page cannot be displayed almost instantly on both IE9 and Firefox...
Strange thing is it was working fine not two weeks ago, I have tried searching google but have not come up with any solutions.
Does anyone know how to fix this?
Thanks,
Alex.

sometime MVC project have a infected build so try these step
try to rebuild , clean and do the disk clean then restart your system. maybe it's possible code work fine.
are you can show browser snapshot then i am sure what was matter with project you trying to run.

Ok after looking high and low I found this article Is Your ASP .Net Development Server Not Working?. It was some changes that were made to my hosts file by a seperate installer, after modifying my hosts file as suggested in the article it once again works.

Related

Create Project from Published App

I've got a serious problem at this moment.
About 6 months ago, I had a C# Project on my laptop which I was working on. I published this App on a server, and it was running fine. In the meantime, we've switched to new laptops, and the old one is wiped.
But in the meantime, we found a bug in the application that I published.
I tried getting back the code but only got the old code which is not up-to-date...
Is it possible that I create a project from a published web app?
Because then I will have the latest version of all the code back.
-Mitch
There are various decompilation tools out there, where you basically feed in a dll and get back a relatively okay version of your code. Do keep in mind that it will not be like for like. Your original code base is gone, for all intents and purposes.
One such tool is https://www.jetbrains.com/decompiler/. It's a free tool but I've used it in the past to crack open binaries.

Adding Presentation dlls to asp.net (with telerik controls) web app causes problems

I am having some problems with my production asp.net v4.5.2 website when I add new dlls. I am developing on a standalone laptop with Visual Studio 2017 and I just added some telerik document processing library functions that need the PresentationCore and PresentationFramework dlls. On my development machine there was no problem, added the "add assembly" line to my web.config and added the reference in Visual Studio and it worked fine. I added the dlls to the bin folder on the production environment (2008r2 IIS 7.0), uploaded the new code and modified that web.config accordingly now it works but my users are randomly having controls and pictures not load and getting kicked out of the website with a 403 access is forbidden error. The users get kicked out after going through CAC authentication (production is a military server). Sometimes it's right after they login (CAC authenticate) sometimes there a few minutes into doing stuff and then bam, a control doesn't load or the 403 error pops. This happens in both Chrome and IE. The controls or pictures not loading generally are fixed with a refresh (not always though) but the 403 error the users have to reboot their machine to fix. I've even had them clear the browsing data (cache, cookies and ssl state) but they still have to reboot.
When I take those dlls out of the bin folder the problems go away. Google seems to always point to Visual Studio answers and the closest things I found here are adding custom .dll class library to asp.net/C# website and How do references work in ASP.NET WebForms websites (not web applications)? Which didn't help. I think you should also know that I have 2.5 years experience in professional coding and system administration and I am the Lead/Senior (and only) developer and the Sys Admin for this project, please use small words for me. Thanks for any help you can provide.
I figure out what was happening and it wasn't the dlls. Turns out the I was missing a CSS file which caused 404 errors and when enough of those piled up the web app would crash or IIS would give a 403 error. I found this by looking at the event logs for IIS on our production test site. It was so hard to find because that CSS was for 1 particular control and if you didn't navigate to the page with that control enough times it worked fine. I thought it was the dlls because I just added functionality to that control that required them and without that functionality the control was not used as much and so wasn't loaded enough times to cause the error.
Not sure why Visual Studio didn't say anything about the missing file but once I removed the call for that CSS file everything worked as expected. I took over this particular code recently and no other place in code are there custom CSS files so I never noticed the call for it. Luckily IIS is set to log everything.

VS2015/ASP not updating iis express files

I have an issue which I believe is IIS Express related. I am making a Web App with ASP Web Forms(I know I should be using MVC, but for this project, Web Forms was specified as required). Whenever I build it opens the url http://localhost:53605 and loads the website. The problem is the copy is showing is old, this started happening yesterday, I haven't installed any updates to VS or Windows.
Things I have tried:
Disabling Chome Cache
Using another browser
Change the IIS Express build url (This works, for ONE build and then it's back to the same issue)
Delete the /bin & /debug folders
Does anyone have a solution to this? I can just change the build URL everytime, but anyone who had made an ASP Web App will you rebuild 100's of times a day...
Thanks
If IE setting is OK, then set vs setting
Go to Tools-Options
Under Projects and solution ->
Build and Run select "Always build" under "On Run, when projects are out of date"
For Chrome VS debug, refer

ASP.NET MVC 5 applications really slow to build

I'm getting into ASP.NET, and I'm using MVC 5 to build my applications while I follow some Pluralsight trainings. I noticed that in the video training the instructor's Visual Studio builds really fast, but in my computer, after I modify something, every time I build it usually takes from 90 to 120 seconds for the build to finish and I be able to navigate through my application on the browser.
My laptop isn't super old or slow, since it has a Core i5 with 4GB of RAM and an SSD. I've tried to set the MvcBuildViews attribute to false, but still the problem persists. I'm using Visual Studio 2015 Enterprise with Update 2.
Any ideas on what should be the problem?
Delete everything under
C:\Users\YOUR_USER_NAME\AppData\Local\Microsoft\WebSiteCache
Check here too
C:\Users\YOUR_USER_NAME\AppData\Local\Temp\Temporary ASP.NET Files\siteName
It seems like it was a problem with Visual Studio 2015 Update 2. Once I installed Updated 3 it got way faster to build. I noticed that now the IIS Express isn't closed between builds, so now when I build my MVC projects I usually see the result on the browser in less than 20 seconds.
This is not much of an answer that will solve this problem for you. But, I specifically run into this issue with ASP.NET applications. With one of our solutions we have nearly 60 projects and that takes WAY to long to fully build and debug inside a browser from VS.
How I solved this was to point one of our servers with IIS to the folder that my presentation project builds too. This way when the web project is built I can browse my IIS website and see the changes. The downside to this is I can't actively debug in VS easily.
As far as speeding up VS to build this faster with debugging I have had no luck with my experience. From messing with symbol loads, just my code settings, VS IIS settings, but nothing has truly fixed this for me.

Why is my ASP.NET website not found by Visual Studio on a different computer?

I was working on a WCF service application in Visual Studio 2012 on my laptop while I was on the train. I'd much rather do work on my desktop so naturally, I zipped up the project files and transferred it over. The project contains the WCF service and an ASP.NET Web Forms Site. I've specified "Use Visual Studio Development Server" and assigned a static port to my project. Everything works on my laptop but for whatever reason, I get the following error when Visual Studio 2012 on my desktop tries to open my solution (specifically the ASP.NET Website Project).
http://localhost:5137 : error : Error opening web http://localhost:5137. The Web site 'http://localhost:5137' could not be found.
I'm not entirely sure what's going on here. The WCF service seems to be working just fine, but not the ASP.NET Website. What is the meaning of this error and how do I fix it? Also, how would I go about avoiding this in later projects? I'm sure not being able to move my work to other places is probably a problem.
I suspect this has something to do with whatever random port number "5137" was generated for the ASP.NET Website but I don't really know.
Thanks,
-Theo
have you tried the solution to open in VS and build again? may be you after compiling the code running it on your desktop machine via F5 or ctrl + F5 will run again the website.
I do face these random port number problems and what I do is restart :)
hope this help

Categories