In advance, apologies for any improperly used terminology... I'm fairly new to web development/hosting, and IIS
I am trying to host a 64 bit ASP.Net 5 (MVC 6) web application, which uses beta 7, via IIS 7.5 on a windows Server 2008 R2 Standard machine.
I am publishing from Visual Studio 2015 (on a Windows 8 laptop) to a shared folder on the server. My IIS web application's physical path is the wwwroot folder created in the publish directory and the website seems to attempt to launch correctly...
Whenever the site attempts to run, however, I receive an error which states the following:
Unable to find the runtime directory 'D:\www\mysite\wwwroot\..\approot\runtimes\dnx-clr-win-x64.1.0.0-beta7'
Possible causes:
The runtime was not packaged with the application
The packaged runtime architecture is different from the application pool architecture.
The frustrating part is that if I copy and paste the link IIS claims it can't find and paste it into Windows Explorer, it leads me to a directory which does exist. That rules out the first explanation. As far as the second explanation goes, I have checked my publishing profile in Visual Studio and ensured that it is indeed the 64bit version of beta 7.
As far as I can tell, the proper runtime is sent with the published files, and they are the correct versions.
Is there anything I'm missing? The application runs fine in Visual Studio 2015. I don't know why when running on IIS it can't find a folder which not only exists, but is readily available to be browsed to.
UPDATE: I've continued to fight with this problem and found some odd symptoms... I can successfully make a website application from just about anywhere other than the D:\www folder. I stuck my site's published files container directly into the D drive and made a site directly from that, and it launched without a hitch. I was also able to replicate this on the C drive, and even placed the published files container into a folder called "wwww" in the D drive (so its physical path was D:\wwww\MySite\wwwroot as opposed to D:\www\MySite\wwwroot).
Does anybody know why "www" is problematic in particular? The folder structure in place here has several other (albeit much older) websites running from the www folder, so it's ideal that this application is placed in the same area. It seems like it works everywhere but there, however.
Any help is much appreciated!
For what it's worth, the solution I went with was to not place the application's publish folder in the D:\www folder. I ended up simply creating another folder in the root of the D drive and pointing the web application in IIS to that.
One of possible causes might be insufficient permissions for IIS user.
I added permission for approot (runtime) folder for IIS_IUSRS to read. Looks like IIS user was unable to read and load content of this directory because of insufficient permissions. After that it worked fine.
Related
To learn more about .Net I created a website but now I want to learn how to Host it, in PHP I would just upload the files to the host and check everything how do I do this with a .Net website?
I have 2 Databases, Controllers, and Views.
I done some research and people said to just upload the files from the bin folder which I tried but it did not work, also tried just tried uploading the DLL files with no success.
Also tried uploading all the files from the project folder but it did not work.
Found a tutorial which right click the project and publish it so I tried publishing it to a folder and then uploading that but that did not work to.
To successfully publish and run your website on your host machine, the host machine must first have IIS (Microsoft's Internet Information Server) installed and running.
Once you have that in place there are several different approaches to deploy your website to the host. Here is a link to guidance from Microsoft's asp.net site in regards to "Choosing the Right Approach to Web Deployment".
Specifically, for you to be able to go "right click -> Publish" from within Visual Studio the relevant approach is "Web Deploy Handler (Publishing)" and you can find detailed instructions for setting it up in "Configuring a Web Server for Web Deploy Publishing (Web Deploy Handler)".
You just upload the files.
But you msut be sure that IIS is configured th acctually watch for a .NET app in the folder it loads in.
For normal we apps you did the right:
Also tried uploading all the files from the project folder but it did not work.
If it "just does not work" then it means .NET is just not there on that server or the folder you upload to is not configured to load a .NET project. Period. This is a fallback (technically you can upload less - the project file, i.e., is not needed), but it should work.
I'm working on a Visual Studio 2012 web application, and need to allow colleagues to view the current website by my IP address (while I would access it my localhost). It appears that hosting the site locally through IIS7 and allowing others to access it by my local IP the simplest method. After troubleshooting and experimenting for a day though, I still don't understand the relationship between an IIS7 site/website/application and Visual Studio web application, and the MSDN explanations are really hard to follow.
Basically, I'm trying to understand:
1) How to set up a IIS website and application (should the 'physical path' be the VS solution folder or deployment package .zip folder?, for example)
2) How to most simply deploy the web application (e.g. File System/ Web Deploy/ Web Package, etc.) and
3) The order to do all of this.
I'm running VS as administrator, my port 80 is open, and have IIS7 set to use .NET v4, yet when I publish the selection using File System in VS2012 to my C drive, the resulting site gets a HTTP:500 error, with no source code underneath. (Also, before even publishing, setting the solution to use my Local IIS instead of IIS Express and previewing results in a blank page). If there is a better way to do this please let me know.
Thanks in advance.
If you don't want to learn (or bother) with the details of setting it up, you can use a small utility like 'ngrok' that will allow others to view your website at 'localhost'.
Takes about 5 minutes to learn and get up and running (and its free).
https://ngrok.com/
I've developed an application in Visual Studio 2010 but I used the VS 2012 to create the
Setup Installer. It's working perfect when running it on Visual Studio 2012, no errors at all.
Detail: I builded this when I used win7, now i'm using windows 8
But when I install the application and try to run it, when it tries to overwrite the app.config file it throws the exception. I already tried to give permission by RightClick - Security tab but didnt solve the problem. I found THIS thread that looks like my problem. But didnt worked... All I have on my app.config is the connections strings. What may it be?
UPDATE
I gave permissions to Users/PC1 in each file.cfg and to the whole folder that the files are in.
And now it seens that it worked, but what may I do to do not need do all of this to run the applpication ? I want to install without needing to give permission to the folders and files. (It's a win8 complications... -.- ).
It sounds like a permission issue, mostly with the project folder potentially.
You should try the following steps:
Run Visual Studio as an Administrator.
Verify that your User Account can Read / Write to your project folder.
Ensure that your Local Service, Network Service, or Local System
Off the top of my head those would be what I would try, more then likely Visual Studio isn't able to modify your app.config which would be tied to your Local Service account- The one that would be tied to your System.
Though the inner content isn't the problem, it is tied to your Directory Permissions which may be inherited to the sub-folders and sub-files.
Hopefully that helps.
I have been using the embedded server that visual studio has to test my ASP.NET MVC 3 application and it has been working fine. I decided that I want to start using IIS on my local machine for my personal development environment as that is how the application is going to have to be deployed.
I installed IIS through the control panel on Windows 7 (so I am assume it is version 7/7.5) and enabled basically every option. I then open up the IIS Manager and added the website. I also added an entry in my hosts file so that the domain I gave the IIS Manager maps to 127.0.0.1.
I then started Visual Studio (as administrator) and opened up the solution. I changed the properties for a few of the references as mentioned in a "How to Web Deploy ASP.NET Applications" article (like System.Web.MVC, System.web.Routing, and a few others). I then went to the main project, right-clicked and clicked publish. I set everything in there for Web Deploy and published it. To double check I when to the folder that I set as the path for the website in IIS Manager and they was a folder called app as excepted (when publishing I gave it website/app so I was excepting that folder) and it had a number of different files.
Edited
At first I was getting a blank page. After restarting my server, I now get a page with the message:
Error Summary
HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
It tells me the most likely issue is that directory browseing is not enable but I would have though that my application would be access from the url (sb.website.com/app). The only files that publish copied over into that folder is the Web.config and Global.asax (it also copied the folder Areas, bin, and Views). Is there some setting in IIS Manager I am missing something else that should be copied over in the publish?
Figured out the issue.
I had to do was run aspnet_regiis -i in command line.
to start - Add a test.html page in your solution just to exclude any extension issues. Try even adding it to your wwwroot folder as well and see if you can hit it from localhost/test.html
I've spent a great long while googling this problem without any luck and I've always found great answers here, so here it goes:
[BACKGROUND]
I have a web application which was developed in C# with Visual Studio 2008. It was a part of a solution with another project which contained a web service. This was not created "IN" IIS (I was using the Cassini ASP.NET Development Server at first, but have encountered numerous issues). I finally got approval to install IIS 5.1 (Government Network - using Windows XP) so I wanted to host my apps there for development.
I moved my projects to another folder created my IIS virtual directories, pointed them at the right location, updated my security settings, ensured that .NET 2.0 was selected and tested the site and web service. They function perfectly in IIS.
[ACTUAL PROBLEM]
I open Visual Studio, click File > Open > Web Site > Local IIS > [Application Name] and it opens up, but my .design files aren't nested under the ASPX / ASCX objects, and when I right click on it and select "View Code" it takes me to the markup instead of the code behind. Once I reach the code behind, I don't have access to any of the members of the design, as though there was a problem with the wire up.
I have tried creating a web site from IIS through Visual Studio, and it works perfectly. I closed it and opened it up again to see if that functionality would persist and it did.
I've encountered this before and have had to re-create a new site through Visual Studio, and manually re-populate it with all of my classes from a "broken" solution. I would love to solve this the correct way.
Please help!
Adam
The best thing I could suggest would be to go through the Project files with a fine toothcomb (as Filburt suggested) and make sure the references are pointing to a virutal directory (or via the inetpub folder, if thats how your IIS settings are configured), rather than a file system directory.
You might also want to check your IIS settings. Is your virutal directory set up to point to a file directory?
Good luck!
All dependencies between markup, .design and code-behind files are laid out in the project file.
You could use a sample project to discover how to correct your existing project.