Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 13, 2012 10:06 PM by mandrews1234
Jan 13, 2012 07:58 PM|LINK
Is there a way to do the same as opening a website, and hitting f5 via command line? I don't want VS to open at all, I just want it to look like the site is running. Is this at all possible?
Jan 13, 2012 08:13 PM|LINK
Use your local IIS and create a website or vitural directory and access it by
Jan 13, 2012 08:28 PM|LINK
I've never really used virtual directories. Can you elaborate on the general concepts of how that would potentially solve my problem? I can google how to set up the virtual directory, I'm more interested in the concept of it.
Jan 13, 2012 08:40 PM|LINK
Say you have a main website running called
www.mywebsite.com and within IIS it would be located under Websites and it would have a default AppPool and run under a specific version of .NET framework. Say the website above holding all the code is located on your hard drive here C:\WebSites\MyWebsite.
This is setup within ISS, its a pointer for IIS to look find code to display the client. In this example lets say
www.mywebsite.com is running under .NET 2.0 framework with Managed Pipeline set to Classic. Also say this website has a few directories in it,
www.mywebsite.com/Members www.mywebsite.com/Documents. All of those folders exist in the main website directory located in C:\WebSites\MyWebSite. You'd have C:\WebSites\MyWebSite\Admin, C:\WebSites\MyWebSite\Members,
Under that website you can add vitural directories. Lets call this one www.mywebsite.com/example that can have different AppPools, different sets of code, permissions, .NET framework, etc. These vitural directories
may or may not have access to interact with the main website or other vitural directory websites. The physical location on your hard drive is C:\Users\User1\Documents\Website\MyWebsite. Within IIS you give it the vitural name "example" and point it at the
location here C:\Users\User1\Documents\Website\MyWebsite and it will run the code in that directory. This particular website runs on .NET 4.0 framework and the Managed Pipeline is Integrated.
Again, they are different sets of code and may or may not intereact with each other.
Jan 13, 2012 09:09 PM|LINK
Ok, so my understanding of virtual directories is correct then. I don't see how that solves my issue? I was just taking the code from my site I was developing in VS and pasting it all into the inetput/wwwroot folder. This laptop is going to be dedicated
to this application and nothing else so that's why I was doing it this way. Then I was just browsing to http://localhost and running the site from there.
Jan 13, 2012 09:22 PM|LINK
It solves your problem because you don't have to press F5 or execute a command line to run the website as your original post had mentioned.
Now if you want it accessible by others on your network, you have to put a DNS entry in pointing to your computer. Not ideal if you ask me to have an application running on a local laptop or computer. Should be on a server but I don't know the situation.
To set the DNS entry up, you'd need to have a static IP on your laptop (unless you want to continue to chage the DNS entry everytime your lease expires on your network). Then in your DNS manager you will create an entry that has a name you want users to
type in the address bar, say http://testapp and it points to your static IP on your laptop.
Then in your IIS setup, add a binding to your website: Type=HTTP, IP Address=All Unassigned, Port=80, Host name=testapp. This would get users not working on your laptop to access the website on your machine from their machine.
Jan 13, 2012 09:30 PM|LINK
Sorry if I'm not following you. But if I create a virtual directory, I would point it to another physical folder correct? And then in that folder, I would put all of my website files right? I don't see how that fixes the problem of it not working when running
under IIS but working when it runs under VS. I'm really not trying to be a nuisence, I do appreciate the help.
Jan 13, 2012 09:45 PM|LINK
Jan 13, 2012 09:57 PM|LINK
Ok sorry, I got this post confused with another post I have.
http://forums.asp.net/t/1758310.aspx/1?Can+t+create+images+ The reason I asked this question was because I'm using the powerpoint dlls to create images from a power point. When I run the site in VS it works fine. However, when I run it as a website, it
doesn't create any images. No error get's thrown it just doesn't work. That's why I was looking for a way to run this through VS via command line because I can't figure out my problem as to why it won't work under the website in IIS but runs fine when I run
it from VS.
Jan 13, 2012 10:01 PM|LINK