I have a IIS problem that I think this blog gives me a fix for:
To resolve it, Right Click on the virtual directory - select properties and then click on "Create" next to the "Application" Label and the textbox. It will
automatically create the "application" using the virtual directory's name. Now the application can be accessed.
However I don't have access to the IIS GUI. Is there a way to do the same thing by editing the web.config file?
I'm afraid this isn't possible. Configuring a directory as an application, setting up the AppPool, etc is the responsibility of the web server. Typically your web hosting provider will offer a control panel that lets you configure the virtual directories. If not, you'll need to contact them through their support channels to have this done.
You can not create a virtual directory via your web.config. If this is on a web host then you will need to use whatever user interface they give you to create Virtual Directories.
or on some hosted sites that you're allowed access to, you need to put in a ticket to the service center or help desk to get them make it an app. They will need to know which version of the .net framework you want it to be also.
The ImageResizer project has a way to create a virtual folder using its own mechanism. It isn't recommended for production, but it may suit some needs.
Add
<add name="VirtualFolder" virtualPath="~/" physicalPath="..\Images" vpp="false "/>
to the <plugins /> section.
http://imageresizing.net/docs/v4/plugins/virtualfolder
Related
The title is purposely generic as I have no clue to formulate my question in any different way.
I have made an MVC 5 project using .NET 4.7.
My goal is to use IIS 10 to point to a domain so I can use that as a testing ground.
I have already edited my host-file to point my localhost ip to the domain I have in mind.
After that I have followed every step mentioned in the video below meticulously.
However I keep ending up on the 403.14 error page.
I have adjusted security to no avail, checked the app-pool to use the correct .net version... I'm all out off ideas.
https://www.youtube.com/watch?v=IwbKquNBNgQ
I hope someone here has some idea of things I have not thought of myself, so feel free to ask anything you think might make the change I need to make this work. I will edit this message (and title) as much as needed to keep up to date as possible.
EDIT: I have followed the full guide that I have marked as an answer. I had 3 differences.
Difference 1 was in Windows Features. I think I just plain didn't correctly mark all the needed features..
Difference 2 was in Security. I did not have IIS_IUSRS added, only IUSR
Difference 3 is one I have purposely keep a difference and that is Directory Browsing. Without this being enabled, it works for me.
I hope that if anyone ends up on this page in the future, the answer provided below will be as helpful as it has been to me.
make sure you enabled below iis features:
please follow the below steps to publish your MVC project in iis.
1)open the visual studio. Select your site and right-click on that-> Click publish.
2)in pick up publish target Select folder option and create choose destination where you want to publish the site. (make a new folder and publish a site in that folder) and then select publish.
3)open IIS manager.
4)expand the server name and right-click on sites and select add a new site.
5)enter the site name, physical path, and site binding details.
ip address: select your machine ip address.
port: 80
domain name: your domain name
6)make sure you enabled directory browsing in iis.
7) The application pool is running under application pool identity, a version is correct and using the integrated pipeline.
8)anonymous authentication is enabled.
9)iis_iusrs and iusr have full permission to access the site folder.
host file enry:
bind your machine IP dress with a hostname of the site.
after doing all the changes refresh the site in iis and browse.
The problem
We're running IIS on Windows 8.1 with Update. We're at the Orchard CMS first time setup screen, and IIS is giving 401s for all static content. We have read the following to no avail:
IIS 7.5 no images css js showing
IIS 7.5 no images css js showing
The official Orchard deployment documentation
Based on those, this is what I have tried that doesn't work.
Turn on the IIS feature to Serve Static Content.
Give IIS_IUSRS permission to Read, write & execute.
Give the site's application pool permission to Read, write & execute.
What does work though is the nuclear option: to give Everyone the Read permission (unless we want to proceed with the Orchard setup; then we need to give Everyone even more permissions.) That leads me to believe that I must give permission to some principle with less scope than Everyone but more scope than both IIS_IUSRS and the application pool combined.
Who/what is that principle?
Pictures to show the problem
We receive a 401 on ..\Themes\SafeMode\Styles\site.css
The task manager confirms that the site is running as the orchard user.
The security properties of the ..\Themes\SafeMode\Styles\ directory gives Read permission to orchard.
Why does it only work when we give Read permission to Everyone?
I had a similar problem. Under authentication, I right clicked "Anonymous Authentication" and clicked "Edit". That shows a dialog giving you the ability to set the identity of the anonymous user. I set it to "Application pool identity" and that fixed the problem for me.
.
This may not be the most secure configuration though, but I'm on a dev server so I don't care.
Try turn on the Static Content and Directory Browsing features under Internet Information Services->World Wide Web Services->Common HTTP Features node.
In my case I had to set Read permission for IUSR user for the web site folder.
So, what I had to do to fix this problem was the following:
(and please understand, that this is not ASP or PHP script related, the server wouldn't even show basic simple .html files, yet would serve out PHP results all day long!)
Two fold…
Had to set the application pool for each site, under advanced settings, to use LocalSystem for it’s process
Under site, advanced settings, security, add the IUSR account to have read & list contents access, for the site… :-)
See any problems with doing that?
'cuz it's working....
Updating windows feature for WWW services/Common Http Features/static content by selecting Static Content checkbox fixed my IIS not service static content issue.
Open IIS -> go to advanced settings of selected website and open Physical Path Credentials -> Select specific user and enter your local user credentials. Open below screenshot for further visualising the things:
IIS Settings
A developer just send me a running website files from IIS directory. I want to know if I can run the website on my PC. The file contain "Default.aspx" file, which I assume is of some importance.
I want to know if it is possible to run the website on my PC, I have installed IIS and I placed the file in the wwwroot folder, but unfortunately I dont know how to proceed from here.
Can someone please point me to the right way to continue with this task.
Thanks in advance
First time use of IIS
Now that IIS is running on your system, it should have defaulted to running on port 80. You can test this out by going to http://localhost/
The file you have placed in the wwwroot directory Default.aspx is an ASP.NET application. You need to go to IIS and convert the directory it is stored into a web application.
Now when creating web applications, it is better to create them in another folder other than your wwwroot folder, and in the case of this tutorial it is easier. Move your Default.aspx into a folder named 'webapp', or something of the like.
To convert it into an application, do the following:
In the Server Manager, expand the
'Roles' item in the tree
Expand the 'Web Server (IIS)' item
Click on 'Internet Information Services (IIS) Manager
In the window on the right hand side, you will need to open up your server. In my case, my server is called WIN2008R2. Your server name will be located inside the 'Connections' pane. Expand your server in the tree
Expand the 'Sites' item
Expand your newly created site. There should only be one there, and the item will have a globe next to it
Now right click on your 'webapp' item which will have a folder next to it, and click 'Convert to Application'. Then leave all the properties the same in the window that comes up and click OK.
You have now created a new web application. By going to http://localhost/webapp you should see it working.
You need to configure IIS to host an ASP.NET website.
You can find information about configuring IIS here: http://msdn.microsoft.com/en-us/library/ms178477.aspx
Another option is using the Cassini web server (instead of IIS). You may find it easier to configure: http://ultidev.com/products/cassini/
Is there a way to setup subdomains udner Xp Pro IIS for something like test.localhost
Can it be done via IIS or the hosts file? Need to do a tets on a site that uses pathign back to the root so having the site ina virtual directory like localhost/test causes issues.
As you're probably well aware that out of the box IIS 5.1 only supports one web site. What you can do is use the adsutil.vbs tool to create a second site in IIS 5.1 and configure it to use that.
The following article explains the process:
IIS: Creating Multiple Web Sites within IIS on Windows 2000 and Windows XP Professional
There's even a GUI widget to make life easy:
http://www.firstserved.net/support/downloads
So in a nutshell:
Create a second site using one of
the methods above (set the IP
address to your machine's primary IP
address)
Add a host header for
test.localhost domain to the new
site
Edit the HOSTS and add an entry for
test.localhost pointing at the IP
address above
Easiest way is to just switch the document root of the lone site you already have to the different folder with the target site. Then you can switch it back when done.
If you are building stuff in virtual directories off the root, this shouldn't even effect any ongoing projects.
I seem to recall there was a tool which did this for you, but I've forgotten it's name and coordinates.
Create a new website in IIS. The host header value should be your subdomain like "sub.localhost", and then add the domain to your hosts file.
open with notepad the file c:\windows\system32\drivers\etc
and add this line:
127.0.0.1 mysuper-site.com.net.blabla
Then browse to this site: http://mysuper-site.com.net.blabla
I wonder what the best approach is for a situation where I want to have the user type in
http://myserver/something/20
and get redirected (301 or 302) to
http://someotherserver/applications/something/modules/default.aspx?id=20
For .net 3.5 and IIS 7 I found some solutions, but unfortunately I am stuck with .net 3.0 and IIS 6.0 on Windows 2003, and I do not want to install anything on the server if possible. I can change the settings for the Virtual Directory though, and if I have to for the entire site.
HTTPModules and web.config are ASP.net only If I am not completely mistaken, hence that will not help as /20 is not sent to ASP.net per Default?
Can anyone give me some tips where I can set up something like that?
The only way I have seen to do it without putting the 301 redirects directly into IIS Manager is to use Wildcard mapping
Link
Map the .* extension to the same DLL as .aspx in the virtual directory's file mappings in Application Configuration. Then in the web.config's httpHandlers section, map the URL to the type.
You might enlist the assistance of ASP.
Create a 404.asp file in your something folder with the content:-
<%
Dim id : id = CLng(Mid(Request.QueryString, InStrRev(Request.QueryString, "/")+1))
Response.Redirect "http://someotherserver/applications/something/modules/default.aspx? id=" & id
%>
In Custom errors of the something folder in IIS manager tweak to URL and /something/404.asp
Note the querystring value passed to the 404 customer error page looks like:-
404;http://myserver:80/something/20
Edit: D'oh or you could use a 404.ashx custom error page and then use more familiar .NET code.
In IIS, right click on the Virtual Directory, select Properties.
Under the Directory tab, click the Configuration... button.
Under the Mappings tab, under the Wildcard application maps (order of implementation): click the Insert... button.
Browse and select C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll, leave Verify that the file exists unchecked.
Move Up aspnet_isapi.dll to the top of the list.
Click Ok, Ok, and try it. Try recycling the application pool if you don't see it work.
We had a situation where the .Net Routing was working on our development PCs but not on the test and production server with IIS 6 and Windows 2003. This fixed our problem.