IIS hanging forever local website - visual-studio

I'm trying to set up the IIS so I can access my local web application project at dev.example.com. I have the physcical path set to the root of my web app, and the binding as shown in the picture below.
I have added this to the hosts file
But when trying to access it in chrome it just hangs forever.
Is there something I'm missing?

I had to set the permissions of my application pool identity
ApplicationPoolIdentity is actually the best practice to use in IIS7. It is a dynamically created, unprivelaged account. To add file system security for a particular application pool see IIS.net's "Application Pool Identities". The quick version:
If you application pool is named "DefaultAppPool" (just replace this text below if it is named differently)
Open Windows Explorer
Select a file or directory.
Right click the file and select "Properties"
Select the "Security" tab
Click the "Edit" and then "Add" button
Click the "Locations" button and make sure you select the local machine. (Not the Windows domain if the server belongs to one.)
Enter "IIS AppPool\DefaultAppPool" in the "Enter the object names to select:" text box. (Don't forget to change "DefaultAppPool" here to whatever you named your application pool.)
Click the "Check Names" button and click "OK".
I found the answer here
IIS7 Permissions Overview - ApplicationPoolIdentity

Related

Configure distributed DCOM

Im trying to allow another computer in the same network so acces a server I have local on my computer.
As far as I know, this should be administrated in Componentservices (accesing it by running dcomcnfg.exe). I then rightclick on My Computer and click on the Properties option. Then i click on the tab called Standardproperties and then I check "Activate distributed COM on this computer".
Then I go to COM-safety and click on EDIT. But Distrubuted COM is not in that list for me to administer.
What am I missing?

Authentication issues using simulated host via UNC

After modifying my "hosts" file I have appended the location for "testunc" to "127.0.0.1". When I type in the path "\testunc\share" into "Run" (I have a shared folder on my C:\ drive called "share") I receive an authentication prompt. I am asked for the credentials to the "Guest" account on my local machine. Though the "Guest" account does not have a password, it always fails.
I am coding an application locally for use on a standalone network. I need to simulate the UNC path locally so that I can see if the application will work on the actual network.
\127.0.0.1\share works great, \localhost\share yields the following alert: "You were not connected because a duplicate name exists on the network."
Edit & Answer
Since I only have 9 rep at the moment I can't self answer for 6 more hours. I will self answer later on. Answer is as follows:
Ok, figured it out. I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.
Self answering this one. Answer is also included in original question text.
I don't advise doing this if there are security concerns on the local PC that you will be using. I.E. undo this once you've done what you need.
Do all this after modifying your C:\windows\system32\drivers\etc\hosts file with the new hostname and IP.
Required Steps Overiew
Install Loopback adapter from Microsoft (might not matter)
Modify registry to disable loopback authentication
Modify registry to disable strict name checking.
Step Breakdown
First install the loopback adapter following these instructions (this is on Windows XP mind you). Go into the properties for this adapter and change its static IP address and gateway if you like. It will work the same way as Localhost but use a different IP.
Follow the instructions in the technet post referenced in my comments above (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Next open your registry (windows + r, 'regedit' in the run prompt).
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After reboot you must now disable strict name checking following the instructions from this article (enumerated below):
Click Start, click Run, type regedit, and then click OK.
Locate and click the following key in the registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
On the Edit menu, click Add Value, and then add the following registry DWORD value: DisableStrictNameChecking
Right-click DisableStrictNameChecking, and then click Modify.
In the Value data box, type 1, and then click OK.
Exit Registry Editor.
Restart the computer.
After the last restart you will be able to path to a "simulated" unc location on your localhost computer. This should help in testing network deployed applications / scripts on a standalone system.

ASP.NET -The current identity (Machine\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'

I am having this issue on my Win XP Professional Development Machine. My application is on Virtual Directory.
The current identity (MachineName\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
I have done following so far.
1. Must Not Use Simple File Sharing. After Changing Settings, Pls Reboot.
Open your My Computer, the on menu, select Tool >> Folder Option the Select View Tab,
Uncheck Use Simple File Sharing
2 Adding User Permission
When you create virtual directory on IIS, the actual folder you used with it must have access permission
To do this, follow:
select the properties of your actual folder, then select Sharing Tab
select option Share This Folder
specify the ShareName (commonly folder name itself)
then select Security tab, you will see the Group and Username listed there.
to add ASPNET just click ADD
pop up window will appear "Select User or Group"
Click Advance and Click Find Now
All Users and Group will be listed there, try to find ASPNET and select OK
you will going to back on Security tab and select something like "RAD/ASPNET", under that you will see "Permission for ASP.NET"
for the last step, check Full Control under Allow Column, then OK
3 I Have tried, the aspnet_regiis exe in the framework folder!
Still does not work, Any other options or suggestions please..
Update:
My Hard disk is completely encrypted. Does it have any impact?
Encrypted shouldn't affect.
Try going to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files in a file windows explorer and give all access to your ASPNET and Network accounts.

Directory Listing Denied : This Virtual Directory does not allow contents to be listed

I am hosting a modx website on ixwebhosting.com
After I submitted the site, I get this message when I try and access the root for example:
wwww.website.com/
or
www.website.com/manager/
I can get it to work, however, if I go directly to :
www.website.com/index.php
or
www.website.com/manager/index.php
ixwebhosting.com offers windows hosting
What do you think is causing this?
Right click on the virtual directory (gear icon) in IIS snapin, click Properties.
Check the box that says 'Directory browsing'
Click okay (and possibly?) restart IIS.
sounds like the default document setting is not "turned on" for the IIS

ASP.NET Web Setup

I have 3 web projects in a Visual studio solution.I want to create a single web setup project which should install all 3 web projects in their virtual directories.So how to create a single web setup project which supports multiple web application installation?
You can do this by creating a Web Setup Project. In the File System add as many Web Custom Folders as you need.
Only the main Web Application Folder will have the installation dialog so if you want to customize the virtual directory names then you will need to add a screen and set the Property of the web custom folder to be the same as the field name on the screen you add.
I never found the whole "web setup project" concept to work well. For starters, I've never managed a web server where the only site configuration was the default web site, so the "out of the box" functionality of defining a virtual directory to be created on the default site never worked for me, and it doesn't sound like it would be very useful to you either.
The best option I've found is to create a standard setup project that installs the output + content files of each web site into a \\Website path (or similar) and write a custom installer action with a supporting GUI that allows the installer (user) to select the proper web site and specify the name of the virtual directory to be used.
As John Hunter said, it is possible to add multiple Web Custom Foldsers beside the default Web Appplication Folder. But you need to know some details about how things add up.
One thing to notice is that the Property name you set for the additional folder will be the physical path of the installation. This however is read only in your setup logic, because it is automatically set later as the location of the IIS default path (typically C:\intepub\wwwroot\) added with the value specified in VirtualDirectory on the folder properties. So what you need to set in the custom screen you add, is not the Property name defined on the folder, but the property name that is used for the virtual directory. This is the Property name you specify appended with "VDIR". So if the property name you specify for the web folder is "WEBSITE1", then the property name for the virtual folder will be "WEBSITE1VDIR". In your custom screen, you then need to set up the property name for the text field you use to "WEBSITE1VDIR", The default value in this textbox will be automatically populated with you default VirtualDirectory value specified on the folder.
If you choose to remove the default Installation Address dialog so you specify also the main web site in a custom text box on the same page as the others, you need to know that the property name for the physical path as you see grayed out is fixed to "TARGETDIR" in the Property name for the "Web Application Folder". However, the property for the virtual path is not "TARGETDIRVDIR" as it would be if it followed the same name convention as the other, but it is "TARGETVDIR".
But if you do remove the default Installation Address dialog, you loose the option to select the web site to use (typically "Default Web Site") and Application pool from drop downs that shows you what is available.

Resources