Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: how to host a cshtml site on my own computer with webmatrix

18 Apr 2011   #1
ugean

Windows 7 x64
 
 
how to host a cshtml site on my own computer with webmatrix

Hello,

Please bare with me as I do not post in forums often and have never used this one. I looked around but was not able to find an answer to my question, but if it is out there please just point me to it. I am currently hosting an HTML site off of my computer. I recently created another site using WebMatrix. It was much easier then writing code in notepad.

So I used a handy tutorial I found (Create an ASP.NET website from scratch) and created the beginning of a CSHTML site. Now I am trying to host it from my computer and am getting very frustrated with how difficult this is.

I have installed MySQL and have a easyPHP working with it. I find it very disheartening that I can view the site when I hit run but cannot actually host it. Currently I use no-ip.com for my website and do not have any complaints. Really all I want to do is swap the current files with the new ones and walla my new site is up and running. Can someone please help me!

Thank you,


My System SpecsSystem Spec
.
18 Apr 2011   #2
Ryan2320

Windows Seven x64
 
 

Not sure if this is the answer you are looking for but have you installed IIS?

I would check out this site: The Official Microsoft IIS Site because you can get PHP and MySQL working with IIS.

PHP on IIS7 : The Official Microsoft IIS Site
Install and Configure MySQL for PHP Applications on IIS 7 : Install the Microsoft Web Platform for PHP : Running PHP Applications on IIS : The Official Microsoft IIS Site

Also check out this tutorial by Orbital Shark: Host a Website - IIS7.5

Hope this Helps,
Ryan
My System SpecsSystem Spec
19 Apr 2011   #3
ugean

Windows 7 x64
 
 

Quote   Quote: Originally Posted by Ryan2320 View Post
Not sure if this is the answer you are looking for but have you installed IIS?


Also check out this tutorial by Orbital Shark: Host a Website - IIS7.5
This is exactly what I already do. How do I get it from WebMatrix to work like this?

I think my PHP is working fine. Not entirely sure as I have never used it before.
My System SpecsSystem Spec
.

19 Apr 2011   #4
Ryan2320

Windows Seven x64
 
 

By default the IIS folder is:

C:\inetpub

My guess is you will have to change something with WebMatrix to move/copy the files to that folder.

A good test to see if PHP is working is open notepad and type the following:
Code:
<?php
phpinfo ();
?>
Save the file as a .php file and put that file in the inetpub folder. For example if I named the file phptest.php. Then on my localhost I would type the following in a URL: http://localhost/phptest.php

You should see information regrading PHP.

Ryan
My System SpecsSystem Spec
20 Apr 2011   #5
ugean

Windows 7 x64
 
 

Ok the php test didn't work. I will have to work on that. Does anyone know a way to get the web files to that dir? can I just copy and paste them from the my web dir?
My System SpecsSystem Spec
20 Apr 2011   #6
Ryan2320

Windows Seven x64
 
 

Quote   Quote: Originally Posted by ugean View Post
... can I just copy and paste them from the my web dir?
You should be able to just copy those files into the inetpub folder.

If you IIS installed I would use the automated install to get PHP working PHP on IIS7 : The Official Microsoft IIS Site

Hope this Helps,
Ryan
My System SpecsSystem Spec
21 Apr 2011   #7
ugean

Windows 7 x64
 
 

Ok I moved the files to the wwwroot folder. At first I got the IIS window. I moved the start file out of the folder then I got the error below. I have full permissions and ownership of all the folders. Any ideas?

edit: wow printscreen idea really didn't work. here is the error.
403 - Forbidden: Access is denied.

You do not have permission to view this directory or page using the credentials that you supplied.
My System SpecsSystem Spec
21 Apr 2011   #8
ugean

Windows 7 x64
 
 

I just copied my currently working web files to this dir and it worked just fine.
My System SpecsSystem Spec
21 Apr 2011   #9
ugean

Windows 7 x64
 
 

I tried your link to dl php and it asks opens a launch application box. It is asking me to choose an application then allows me to pick something from my drive. What do I choose?
My System SpecsSystem Spec
21 Apr 2011   #10
Ryan2320

Windows Seven x64
 
 

Although SevenForums is the best when it comes to Windows 7, the problems you are having are the result of IIS so I would check out the Official IIS forums: Forums : The Official Microsoft IIS Site

The folder permission is a tricky one, You have to make sure the User IUSR_<computername>, has permission to access it.

For the PHP application I don't remember off the top of my head, but I think it just wants to know where you want the PHP application installed. Again I would check of the IIS site to make sure.

Hope this Helps,
Ryan
My System SpecsSystem Spec
Reply

 how to host a cshtml site on my own computer with webmatrix




Thread Tools




Similar help and support threads
Thread Forum
Can't open one web site from #1 computer.
Please be patient and help me figure this out. Win 7 and IE 11 on all my networked computers. For years I have been going to the Kroger grocery store web site from a shortcut on my #1 desktop. A few weeks ago a different Kroger web site came up and it would not let me sign in. The correct...
Browsers & Mail
Network Printer won't print until Host Computer reboots
I have just installed Windows 7 32 bit on a computer with is hosting a HP Laserjet 1600 printer to which I would like to print to from my laptop running Windows 64 bit. I have added the network printer from the host machine but it won't print. Both systems File and Printer sharing is turned on in...
Network & Sharing
My computer won't go to a specific web site.
I hope this is the best section to post this. I cannot go to The World's Most Advanced Business Jet Aircraft - Gulfstream with my desktop computer. My laptop will access it (its on same wireless network) and my wife's machine can access it (same network but not wireless). I've tried checking my...
Network & Sharing
How to host my Computer for remote desktop connection
Dear Guru's, I am new to networking world, and I am trying to setup my computer as a host, so that i can access it using a different machine over the internet. Host Computer OS: Windows 7 Ultimate N My Router is D-Link: DIR 615 Help me guys, i am need of it.
Network & Sharing
Move files from host computer to guest computer?
How can i move files from my host computer to my guest computer? In the VPC 2007 i could drag them from host to guest but that isn't working now, or i'm doing something wrong. ,Wiisper
Virtualization


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 20:58.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App