Unable to run the application from VS 2015 [duplicate] - c#

This question already has an answer here:
"The underlying connection was closed: An unexpected error occurred on a send" after installing VS 2015 update 2
(1 answer)
Closed 4 years ago.
I am running my application using VS 2012 initially, That time it's working fine. After that we installed VS 2015 update 3. Now we are not able to run the application.
Getting Unable to start the debugging server on the web server. The Underlying connection was closed.An unexpected error occur on a send.
My application hosted in IIS, host entry fine with host file. I am able to run the application from IIS. And get the Verbosity -Diagnostic output. There is no conflicts between the packages. Firewall port is enabled as well as there is no Anti virus blocking.
Before installing VS 2015 it's working fine, Please let me know what is the issue here. Is there any .netframework conflicts, Please help to resolve the issue.

Try these:
Try changing the port being used to something other than 80 which may being used by another application.
Check to make sure the app pool has the right privileges.
Are VS2015 components installed on the remote to allow for VS2015 debugging? See Installing Remote Tools

Related

Why does my C# application built with VS 2019 not run on another computer? [duplicate]

This question already has answers here:
VS 2010 One Click Deployment Issue "Application Validation did not succeed. Unable to continue"
(3 answers)
Closed 2 years ago.
Built a .NET Framework WinForms application in VS 2019 Community. The application runs on the machine where it is built. However, it does not work on another computer.
Got this "Application validation did not succeed. Unable to continue." message everytime installation was tried.
Tried:
copying the contents of the bin/Debug folder to the other machine.
copying the contents of the bin/Debug folder to the other machine.
"Publish"ing the project and installing it on the other machine.
"Signing" the project with security certificate created by VS and then tried all the above.
Compiling on Win 8.1 machine and copying / installing on Win 10 machine.
compiling on Win 10 machine and copying / installing on another Win 10 machine.
all the above WITH and WITHOUT selecting "Enable ClickOnce Security settings" in project properties "Security" tab.
Issues that may be affecting, from what was gleaned from searching the net, could be:
The security certificate generated by VS2019 was SHA1, may be SHA256 is needed to run the application on another machine ?
The "Smart Screen" on the other machine is not allowing the application ?
The application connects to the internet to do some tasks, which the target machine is not allowing ?
Does the application needs to be installed using an "installation package" or something like that ?
Has "VS2019 being used to build the application being 'Community' version" anything to do with this issue ?
If the project is compiled from source on the other machine in VS 2019, it works well on the other machine. So, at this point, installing VS 2019 on each machine on which the application is to be installed, and then building the project from source on each machine, seems to be the only solution a this point.
What am I missing or doing wrong ? (tackling "deployment" for the first time in my life !)
Welcome to deployment. The discipline basically consists of:
Deep dependency analysis. Understanding what the "footprint" of your application is so that it'll work on any machine.
Learning how to automate #1. Could be Windows Installer packages, Click Once, scripts, containerization or whatever.
For your error message this seems relevant.
VS 2010 One Click Deployment Issue "Application Validation did not succeed. Unable to continue"

Cannot connect to MS SQL from IIS [duplicate]

This question already has answers here:
IIS applicationHost 'setEnvironment' attribute
(2 answers)
Closed 3 years ago.
I'm developing a .net core application. I have local SQL server. When I debug application from Visual Studio, it works great. But when I publish app to folder and want to run it from IIS, it cannot connect to database.
From database I found this error messages for failed logins:
Error: 17204, Severity: 16, State: 1.
FCB::Open failed: Could not open file C:\Users\p4too\AppData\Local\Temp\VS11CodeIndex\Microsoft.VsCodeIndex_86bc9b9e_7c02_4fe0_9598_c87ac2dd85db.mdf for file number 0. OS error: 3(The system cannot find the path specified.).
I was looking for that file, but I did not found even folder VS11CodeIndex.
I use
Entity framework core 2.2.4
SQL Server Management Studio 15.0.18118.0
This is what solved the problem for me... you need to open C:\Windows\System32\inetsrv\config\applicationHost.config in Notepad and add setProfileEnvironment="true" to your AppPool.
In IIS, configure the app pool to run under an account with permissions to the DB on the server (advanced options of the app pool)
In the advanced option of the app pool, set Load User Profile to true

unable to launch IIS Express webserver and tried all options available in stackoverflow

hi guyz I am using visual studio 2012 IIS 8.5 and when I run the webpages I will get the error like
Unable to launchIIS web server express failed to register URL http://localhost:64286 for site webapplication application "/" Error :access is denied
I have tried all solutions available in stackover flow and online except changing port number as I couldn't find the option under properties->web-> dynamic ports OR any other option to change port number. Till morning it was working fine problem started when I restarted the system and since then I was unable to solve this
I have made visual studio run as ADMINISTRATOR and tried rebooting the system
I can't find the path to change port number so, no luck doing that.
I don't understand all if sudden why it is behaving like this.same code was running fine since 2 months and since morning it stops running with this ugly error
Please help me I have project viva tomorrow
TIA
Do you have an aggresive firewall that blocks the port or program? What happens if you go to http://localhost:64286?

WPF Application designed in VS 2012 won't run on Windows 7 machine

I've designed a WPF C# application using Visual Studio 2012. The application, which is simple enough, runs fine on my Windows 8 machine using the ClickOnce deployment method. The datagrid displays the content from a SQL Server database and performs all of it's other functions just as I've designed it to, but when I attempt to install it on a Windows 7 machine it immediately crashes and I'm not sure why. The Windows 7 computer I'm trying to install the application on has .NET 4.5 running on it, but is there anything else that computer needs to have installed on it in order to run applications developed with VS 2012. This is my first attempt to install an application developed with VS 2012 on a Windows 7 machine, so I'm not sure if there's another step that I'm missing here. Any help you guys can provide would be greatly appreciated. Thank you.
The message you stated "The application has stopped working and that if Microsoft has a solution..." is an indicator of one of the following:
The Framework is disabled; though 4.5 is installed several root instances are built on the foundation which are apart of Framework 2.0. This particular Framework can cause issues for 3.0, 3.5, 4.0, and even 4.5.
The System.EnterpriseServices.dll is damaged in the Framework. Which needs to be connected back to the Global Assembly Cache (GAC).
And another common issue is the machine.config file log in the Framework Folder can be corrupt and needs to be replaced with a valid one.
There are others that can occur within the System Policy Folder as well, which may require you to use the .Net Cleanup Tool and reinstall the Framework. But before you do any troubleshooting you should go to the Event Viewer and get details of what is going on.
Try these steps first for me:
Windows Key + R
When the run prompt appears type: appwiz.cpl
Go to the left hand side: Turn Windows Features On or Off
Turn Framework 3.5 on if it isn't already; if it is already on go to Step 5.
Turn off the Framework; then reboot.
Once rebooted follow steps 1-4 again.
Now at this point I would suggest trying the application again. If it fails try this:
Open Start
Type 'cmd' in Search
Right Click and Run as an Administrator
Type %windir%\Microsoft.Net\Framework\v2.0.50727\ngen.exe update
Then type: sfc /scannow
The Native Regeneration tool will try to repair the Framework back to a factory state; the System-File-Checker will attempt to fix any errors indicated in Windows. If it can't it will say 'it found integrity violations'.
Those are the steps I would do for general support; but you really should try and locate an error message. As the Framework can become a huge ordeal to cleanup and fix. If you provide more information I will revise my response to help address it.
Hopefully that helps.

What could cause "Connection Interrupted" on LocalHost when debugging in ASP.NET

I'm trying to run a freshly created ASP.NET Website using C#, however when I do so it launches FireFox and attempts to connect to http://localhost:1295/WebSite1/Default.aspx (for example), but after about 10-15 seconds it displays a "Connection Interrupted - The connection to the server was reset while the page was loading." Error.
This issue is also present with older ASP.NET C# pages/Web Services I've built in the past, nothing is actually running off the ASP.NET Development server.
I am using: Windows XP Pro SP2, Visual Studio 2008
For reference I have SQL Server 2005 Developer Edition installed as well.
I have tried:
Browsing it with IE instead of Mozilla
Trying 2.0 framework instead of 3.5
Reinstalling Visual Studio 2008
This problem seems so trivial the more I think about it, but I havn't been able to work it out just yet! Appreciate any help on the matter.
I had the same problem, and when I was about to quit and run away and join a monastry I had an idea to check ELMAH - maybe it had caught it...
Sure enough, ELMAH told me it had caught this:
System.Web.HttpException (0x80004005): Maximum request length exceeded.
and this fixed it:
<system.web>
<httpRuntime maxRequestLength="65535" />
</system.web>
Good luck,
Dave
When you launch the application, a little info mark appears at the right bottom of your screen telling you that the local web server was started and on wich port. You should compare that port to the one that appears in your browser. If they are different, an anti-virus could be responsible for that problem.
Another place to look is your host file. Some software tweak this file and can make your localhost disbehave.
Something like Fiddler or another proxy like server could cause this issue if local addresses are proxied.
You can check this under Control Panel/Internet Options - Connections Tab, Click LAN Settings down the bottom.
Try adding "127.0.0.1 localhost" before the line reading "::1 localhost"
in c:\windows\system32\drivers\etc\hosts
This worked for me (VS2008, Vista Ultimate)
I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url.
I've the same problem, just instaled VS 2008 in a Vista Business machine. I have a LAN, but no proxy server and the c:\windows\system32\drivers\etc\hosts" with "127.0.0.1 localhost" are there. but none of my projects work, neither new ones.
"I had a similar problem on Windows 7 RC and Visual Studio 2008 SP1. Changing localhost to 127.0.0.1 helped. Similar to the hosts file solution, but doesn't require the file editing, you just need to change the project startup url."
This solution is working fine.......

Categories

Resources