Draw.io IIS Virtual Directory - iis

I am struggling to make the necessesary configurations to run the Draw.io Asp.net samples (https://jgraph.github.io/mxgraph/dotnet/index.html). According to the docs To run the ASP.NET examples in IIS, a virtual directory must be created that maps /mxgraph to the top-level directory of this distribution. To do this I have opened an IIS Manager and in Default Web Site I have added a virtual directory called mxgraph however, this did not solved the issue. Also, I have tried to create new Web Site in IIS and mapp to mxgraph folder which again di not work. Anyone has a clue how to make this work?

Related

My iis automatically points my solution directory though it's published

I have published my IIS application to C:/inetpub/wwwroot/appDirectory and it's have different configuration in web.config file.
and in development version solution directory i have another web.config file and When i build solution my IIS start pointing to solution directory.
that's too annoying, every time i need to remove application from iis and again make application on IIS itself.
Go to properties of your web service in Visual Studio.
Navigate to Web tab
Either Change the local IIS to express or you can give a different application name so it wont replace your deployed application.

Website not working in IIS 7 using the IIS Manager

I have Microsoft Windows server 2008 R2 and have the IIS 7 running.
I have coded a web application on a seperate laptop and would like to publish it now on my server (serves as AD, DNS, File Server, IIS) that runs locally and has no external access. We will be using the application internally only.
I have followed the steps to install a website on IIS, however, it does not work. Below are the steps I have done.
Created a folder hierarchy and pasted the code files there. (check below image. The code files are inside wwwroot)
Create a new website from the IIS Manager as the below image.
The wwwroot folder has SYSTEM permission and it inherits the permissions from the parent. (Does it need to have other permissions?!?)
Whenever I visit the website, I get an error that the page is not found.
UPDATE
Upon #Ravi A's answer below, I have tried his steps as the below image, but the username is not found and the error persists.
Any ideas what is wrong?
windows iis website
You need to add a binding in your DNS i.e. ping mysite.local should resolve to the server IP, in your case since it's a intranet it should resolve to 192.168.1.253.
See here on how to do it. You need access to DNS Manager.
Also since you are not clear on DNS mapping leave the hostname empty and use machine name or IP to browse the site.

How to configure an MVC6 app to work on IIS?

So I'm building an MVC6 app in Visual Studio 2015 and have managed to figure most stuff out, however, I haven't yet worked out deployment.
In MVC4 (what I was using before), our process* was publish to a folder, then setup the website in IIS (Right-Click on Sites -> Add Website).
Actually, our process is set it up in IIS and TeamCity, but not for test apps like this :).
I followed this process and obviously it's trivial to setup the IIS website and publish to the correct folder...but that does not actually work for me.
We're running IIS 8 on Windows Server 2012 and we've installed the .Net 4.6 runtime on the server.
The following steps have worked for me and should help you host your project on IIS.
Using Visual Studio 2015 Preview as your IDE,
Create an ASP .NET 5 Starter App.
Check that it is working outside of IIS.
Once complete, publish the application. In this example, I have selected the location C:\PublishWebApp.
3.1. When publishing your application, make sure that you have:
Disabled precompilation
Selected amd64
(See image below)
Upon a successful publish, go to C:\PublishWebApp.You should see the folders approot and wwwroot inside.
Now open the IIS Manager (I am assuming you have the ASP .NET 4.5 feature enabled)
Create a new website.
6.1 : Select the wwwrooot folder as the website's physical path. In this example, it is C:\PublishWebApp\wwwroot.
Check the website to see that it is working. If you encounter any errors, please post them here.
If the precompile option is ticked in the Publish Web Settings window pictured above, then you must
Go to the wwwroot folder of your published web application. In this example, it is C:\PublishWebApp\wwwroot.
Locate web.config.
Inside the folder of your published application, there is an packages folder inside of the approot folder which should contain a folder named after your application, with a folder for the version underneath. Inside that folder should be a folder named root. In web.config, set the value for the key kre-app-base to the root folder. For reference, see the line of code below. In this example, the application name is WebApplication10.
<add key="kre-app-base" value="..\approot\packages\WebApplication10\1.0.0\root" />
I Spent hours on debugging the issue finally got it worked, steps:
1) Publish your MVC6 application using visual studio into file system, make sure you are selecting correct DNX Target version in my case its dnx-clr-win-x64.1.0.0-rc1-update1.
In the output folder map "wwwroot" folder to your applicaiton in IIS (DO NOT Map it to sup-applicaiton, only ROOT application in IIS works with DNX for example "Default Web Site").
I have just spent a day trying to get this working. i found this here (search for posts by GuardRex) invaluable, complete the steps the accepted answer gave, that's the start of it.
Pretty much if you try to add an application to a site there is bunch of workarounds and extra configuration needed that is detailed in the link.
For starters:
1)Make sure you have the HttpPlatform handler installed here
2)Seems obvious but make sure .net5 is installed on your server here
I know this is if you are adding an application to a site, but there's some pitfalls and much needed refinements needed for the deployment process at the moment that everyone should be aware of.

Does ASP.NET MVC 4 application have to be in the root folder of a site on IIS 8?

iI have a ASP.NET MVC 4 application based on the VS 2012 Basic template. Using VS 2012, I can deploy the app into a root of an IIS server, such as c:\inetpub\wwwroot. Then, I can go to [http://]mymachine/ and see the app.
But, if I try to move the app to c:\inetpub\wwwroot\Test, an attempt to access [http://]mymachine/Test results in "HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."
I tried to move the folder both manually, and also by deploying to that folder from VS 2012, but there was no difference. I tried to move the web.config file into c:\inetpub\wwwroot while leaving the rest of the app under c:\inetpub\wwwroot\Test, but that also doesn't work. I have to move global.asax, global.asax.cs and the bin folder into the site root, but then the whole app is again in the root folder, which is not what I wanted.
Does anyone know whether what I'm trying to do is possible? Thanks.
PS.: Sorry about the link formatting - I used the square brackets around [http://] to prevent stackoverflow from treating the example URIs as links.
You need to ensure that the sub-folder has been converted (or created) as an application in IIS. Load the IIS manager and locate the folder under the website node in the tree, right-click and select convert to application. If it's not listed, use the add application option.
Keep in mind that the child application will inherit web.config settings from it's parent by default (among other things). More information can be found on MSDN.

Converting virtual directory to application on IIS

i have worked for a year now , on server side applications and everytime i add a site to the iis it is added as a virtual directory. none of my web sites worked as a virtual directory on the iis. all applications always had bugs untill the minute i converted them to applications.
after converting the main folder to application everything works.
what does it mean to "convert to application" and why all problems are solved when i do that ?
Have you read the guidance provided by the IIS team http://learn.iis.net/page.aspx/150/understanding-sites-applications-and-virtual-directories-on-iis/?

Resources