views:

163

answers:

2

I imported a website made in visual studio express 2008 to visual studio express 2010. When I run the home page I get the following error:

"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."

When I looked up the meaning of this on Google I read their needed to be a change to the configuration of the virtual directory. Another suggestion was to change the web config files . T

Were these suggestions correct? If so how do I emplement them so that I can view these website pages on my local machine.

A: 

To try the first suggestion:

Right-Click MY_COMPUTER, choose MANAGE.

Expand the SERVICES (then IIS) section(s) in the left-hand pane until you can see the directory containing the "home page"

Right-Click that folder and Choose PROPERTIES.

Click the "Create Application" button.

================================ EDIT ADDED after I realized I could edit an answer

No, you can't create an app using the WINDOWS EXPLORER...

So... here's a more descriptive instruction:

Once you've expanded "Services and Apps" the left hand pane should contain (at least) "Services", Indexing Service, and "Internet Information Services."

Click the "+" to the left of "Internet Information Services" and that action should expose (at least) "Web Sites", Again click the "+" to expose (at least) "Default Web Site."

Once more click the "+" to the left of Default, to expose the Virtual Directories.

Hopefully you will find the FOLDER in question (containing your 'Home Page'). Right-click it, choose PROPERTIES, and see the "Create Application" on the "Directory" tab of the window that pops up.

//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\

If You Do Not See your folder in that final list, it is because there is no virtual directory pointing to the My Documents folder that contains your web site (and home page.)

To create a virtual directory, right-click on that DEFAULT WEB SITE (now visible in the left hand pane) Click "New.." and choose "Virtual Directory." Follow the directions offered in the popup window ... i.e. Browse to your folder, etc.

Too bad StackOverflow does not offer the ability for me to add pictures.

If you still have trouble, I can create a set of screen shots for you and put a link to it in another response.

tobrien
Tobrien, thanks for replying to my question.When I click Services and Applications the Internet Information Server is there and on the right-hand content pane there is a list of different things about IIS, however I see nothing about directories or file paths to select the home page. Since I did not see this folder structure I went back to my documents where the folder is located,right clicked and selected properties but there was no option to select "Create Application".
waterfalrain
A: 

Did the directory tree get jacked up on import? I've gotten this when for whatever reason, I end up with two web.configs in the directories of the project.

aape