ASP.Net 4.6 + IIS 8.5? How do I add an application? - asp.net

I have a ASP.Net 4.6 application that I want to run on an IIS 8.5 server (Windows Server 2012). Well, I added a new website and selected the "wwwroot/" folder from the "output/" directory. The basic resources seem to work since there is a index.html in that folder. However none of the actual code seems to work.
I am using dnu publish to deploy the application.
It creates to folder "approot/" and "wwwroot/" - the wwwroot contains a bin folder with one single "aspnet.loader.ddl" in it.
I probably didn't configure the IIS right, but as said, I been looking for the past week to get a solution and there is almost zero documentation other than "it should work" - well it doesn't.
Anyone has an idea?

Ok I got it figured out after reading through the GitHub issues:
https://github.com/aspnet/Home/issues/452
For those who have the same issue, you need to deploy with
dnu --runtime active
Otherwise the DNX runtimes will be not copied. Also you might activated 32bit pools.
All kudos goes to GuardRex.

Related

ASP.Net Core 2 - IIS 502.5 Error

I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine.
After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging.
Running dotnet run within the directory of the application, I can access the site just fine. It is just when I run it via Visual Studio/IIS Express I get this error.
HTTP Error 502.5 - Process Failure
The application builds and compiles just fine. I have also cleaned the solution.
Looking in the event logs I find:
Application 'MACHINE/WEBROOT/APPHOST/MYAPP' with
physical root 'C:\Users\Ben Hawkins\Desktop\Development Folder
\Dev\Website\Version_2\MYAPP\MYAPP\'
failed to start process with commandline 'C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web
Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Ben
Hawkins\AppData\Local\Temp\tmp3547.tmp"', ErrorCode = '0x80004005 :
0.
Within my output window in Visual Studio 2017 I recieve this message under
ASP NET CORE WebServer
Failed to initialize CoreCLR, HRESULT: 0x80131534
What I have tried:
Cleaning the solution, rebuilding etc
Restarting the computer
Trying to launch another application. (Same result)
Created a new application from scratch. Same result.
Repairing Visual Studio Community 2017. Same result.
Stopping/Closing IIS Express
My setup was working perfectly yesterday and suddenly is not.
Thank you for your time. I hope we can find a solution.
We finally found the issue! After logging on to the machine as a different user, we saw a warning that the main user had ignored initially. There was a 0 byte file in the root of the directory named "Program" with no file extension. It appears that this causes some sort of issue when VSIISExeLauncher.exe is invoked through Visual Studio. (Note it would work if executed from the command prompt). After deleting the file, everything worked!
We do not know how this file was placed there for certain, but suspect it was some sort of copy error when the user was pulling in files from his old hard drive.
I don't know if anyone else will come across this, but if so hopefully this helps!
Maybe you need install previous versions of .NET Core, isn't it? I installed here and it works now. I had only .NET Core 2.0 installed and I realized that applications with 1.1 stopped so when running. In Windows' event logs I've had the same error registered.
Try to change the IISExpress to IIS by creating new IIS profile and change the Lunch to IIS. It resolved my problem.
I have hit a very similar issue with ASP.net Core 2.0. I had copied my VS project to a new one, and I was getting this error message.
After doing some research, I was able to determine that the nlog.config file was not copied into the bin > Debug > net461 folder. Once I did this, I was able to run my application.
I found it by running dotnet run from the command line on my project where the csproj files live.
Had same issue yesterday (windows 10).
Solved it this way:
Update Microsoft.AspNetCore to latest (Nuget manager - 2.1.3)
Make sure the sdk also updated to latest version. if not, update it manually from Nuget console like this:
Install-Package Microsoft.NETCore.App -Version 2.1.3
Download and install latest ASP.NET Core/.NET Core: Runtime & Hosting Bundle
from here
Same problem with version 2.2. Reinstalling .NET Core SDK fixed the problem for us.
In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.
I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.
After that I was able to access the local website that was setup in IIS without running it in Visual Studio.

ASP.net and devexpress scheduler, works local, does not work live

Hi guys I got some code here thats buggin me.
ive managed to create a page and get it working on local host, but when i publish this to go live and nav to the web page it comes up with this error.
Could not load file or assembly 'DevExpress.Web.v11.1,
Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or
one of its dependencies. The system cannot find the file specified.
(E:\web\shafteccom0\htdocs\Calendar\web.config line 44).
Ive tried adding all the references, and i mean all of the dev express ones, including ones i dont even need.
my project is a web project using visual studio 10, asp.net,C# & .Net version 3.5
ive also tried changing the .net version to 2.0, 3.0 and 4.0 but no luck.
If you need my code let me know and ill edit this.
Many thanks
That error means that the library that your application is looking for does not exist on the server you are deploying it to (or it cannot load it with the variables provided). Does the live server have the VS2010 references installed to it?
Just making sure: Are you sure your references set to "CopyLocal"?
I think DevEx installs it's assemblies in the GAC, so your local copy may be working but not when you deploy. Have you tried looking in the bin on the publish location to see if they are actually there?

How to deploy MVC 2 application on Mono hosting ? how to check if MVC is supported?

I have a very simple MVC2 apllication and it works when I start it in Visual Studio (on the dev. webserver)
I try to deploy this on a mono hosting, but currently no luck.
1 I'm not sure about the following about the applicaion:
how to deploy MANUALLY a mvc2 application - no matter if on mono or on windows asp.net.
I don't know which files I need to copy where.
2 I'm not sure about the mono hosting:
when I put a simple aspx page to get version info I get the followin:
2.6.7 (tarball Tue Aug 31 04:50:05 MSD 2010)
according the mono 2.6.7 release notes mvc2 is supported...
when I try to run the MVC2 app after copying the files on the host server via filemanager I get the following instead of index:
Index of /
Parent Directory
Global.asax
Web.config
Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8e-fips-rhel5 DAV/2
mod_wsgi/3.3 Python/2.7.1 mod_mono/2.6.3 mod_auth_passthrough/2.1
mod_bwlimited/1.4 FrontPage/5.0.2.2635 SVN/1.6.17 mod_perl/2.0.5
Perl/v5.8.8 Server at ..........
Any hints on manual deploying of MVC2 and on mono MVC2 support will be appriciated.
Thanks in advance
Best Regards
Ivan
1
In MonoDevelop, there is an option called "Deploy to Web..." in the "Project" menu item that will help you export only the files you need to run your site (I believe there is a similar option in Visual Studio called "Publish to Web"). Keep in mind that you need to set the build action to Content for any non-code files you want included in the export, i.e. picture files, style sheets, etc.
2
Running MVC2 sites using Mono isn't as straightforward as simply installing the runtime. You'll need a capable web server. In most cases, that web server will be Apache with the mod_mono mod enabled. I've only been able to get it to work using mod-mono-server4, which requires the Mono 2.8 runtime. You'll also need a specific Virtual Host configuration.
A nice walkthrough for getting all of the above working can be found here: How to get ASP.NET MVC 2 working with Mono in 10 Steps

MSBuild failing to build referenced projects when upgrading to VS2010

I have recently upgraded my .Net 3.5 solution containing some C# code projects and a ASP.net web site project to VS2010 (from VS2008). It is building and running fine inside VS, but I get some problems when trying to build it on my server with MSBuild 4.0 via TeamCity. It seems like the projects that are referenced from the web site are not built. This was all working fine before I upgraded to VS2010, MSbuild 4.0 and Windows SDK 7.1.
Inside the msbuild script that I use to build from teamcity I have defined project references for the web site like this:
<ProjectReference Include="..\src\trunk\DataAccess\DataAccess.csproj">
<Project>{C43242F4-7286-4BEC-9A27-001D6FC14860}</Project>
<Name>DataAccess</Name>
</ProjectReference>
When I try to run the build script I get an error message saying that it could not find the dll file when trying to copy it from the bin folder of the referenced project into the bin folder of the web site. This is happening because the referenced projects are in fact never built at all (No bin folder exists in the project dir).
Does anyone have a clue what may cause this? I am not very experienced with MSbuild, so I may have overlooked some important stuff. Is it not so that MSbuild will automatically try to build the referenced projects if no project output is existing?
Will be thankful for any help!
I would need some more info to guide you on this, but off the top of my head try adding
/toolsversion:3.5
to your msbuild call.
I found another post on this website describing your exact same problem. I also ran into this same problem too.
This blog on the MSDN Website describes the problem and the work-around. Basically it's a limitation of solution files which are not in an MSBuild format, but just a fancy text file. And the real thing is, that the dependencies need to be specified in the project files them selves not the solution file. ahhh... just read the link it explains it a hundred times better than my answer here.

Visual Studio 2003 - opening ASP.NET project - getting "The operation timed out" error message

Occasionally, when I open a visual studio 2003 ASP.NET project it seems to spend forever loading up then finally displays the following error message:
"The web server reported the following error while attempting to create or
open the web project located at the following URL:
http://localhost/myprojectname. The operation timed out."
Any idea why this happens and how to fix it?
The fix for me was to unregister the re-register iis for .net:
Open command window and navigate to C:\windows\microsoft.net\framework\v1.1.4322
Type in aspnet_regiis -u
Once finished uninstalling ASP.NET type in apsnet_regiis -i
Just performing aspnet_regiis -i by itself did not work.
Still unsure as to why this is happening but probably something to do with switching dev environments between Eclipse\Java\JBoss to VS2003\C#\IIS
This worked for me...
http://forums.asp.net/p/1192304/2066860.aspx
On my XP development machine I went to "C:\Documents and Settings\USERNAME\VSWebCache\USERNAME\" and deleted the folder matching my VS2003 solution name. (Actually I moved the folder to C:\Temp just in case). This worked, although one designer file would not load without a re-build and the start-up page needed to be re-marked. I don't understand why my solution depends on this VSWebCache (it re-appeared when I re-built my solution.) Can anyone explain this dependence? It's un-settling.
This Worked for me. Hopefully it will work for you people also.
Initially, I had tried these many things :
Open command window and navigate to C:\windows\microsoft.net\framework \v1.1.4322 Type in aspnet_regiis -u Once finished uninstalling ASP.NET type in aspnet_regiis -i (It was working sometimes but not always).
I tried by Clearing the vswebcache of Visual studio 2003, as per some forum answer, but didn't work out.
Then finally, I used my own technique and it worked for me. I took the old dll's for the project which was not getting load and i had replaced the dll's with old project dll's. After that my project got load into visual studio 2003. There will be one dll and pnb file with name of project which will get corrupted sometime and your project wont get load into IDE.
So, if you face similar issue, then you have two options:
1) Replace the Dll's with old dll's.
2) Delete the Dll and pnb file with project name and try to reload it again.(Deleting the dll is not going to affect your code and other dll's).
Hopefully it will work for you too :)

Resources