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

ugean

New member
Local time
10:45 PM
Messages
6
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 Computer My Computer

At a glance

Windows 7 x64
OS
Windows 7 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: http://www.sevenforums.com/tutorials/23733-host-website-iis7-5-a.html

Hope this Helps,
Ryan
 

My Computer My Computer

At a glance

Windows Seven x642.2 GHz Dual Core4GBATI Mobility RADEON HD 3470
Computer Manufacturer/Model Number
HP Pavilion dv5 Notebook PC
OS
Windows Seven x64
CPU
2.2 GHz Dual Core
Motherboard
Quanta 3600
Memory
4GB
Graphics Card(s)
ATI Mobility RADEON HD 3470
Sound Card
ATI
Monitor(s) Displays
Laptop
Hard Drives
ATA Hitachi HTS543215 (5400RPM)
Case
Laptop
Cooling
Fan
Internet Speed
Basic DSL 1.5 up and Down

My Computer My Computer

At a glance

Windows 7 x64
OS
Windows 7 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 Computer My Computer

At a glance

Windows Seven x642.2 GHz Dual Core4GBATI Mobility RADEON HD 3470
Computer Manufacturer/Model Number
HP Pavilion dv5 Notebook PC
OS
Windows Seven x64
CPU
2.2 GHz Dual Core
Motherboard
Quanta 3600
Memory
4GB
Graphics Card(s)
ATI Mobility RADEON HD 3470
Sound Card
ATI
Monitor(s) Displays
Laptop
Hard Drives
ATA Hitachi HTS543215 (5400RPM)
Case
Laptop
Cooling
Fan
Internet Speed
Basic DSL 1.5 up and Down
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 Computer My Computer

At a glance

Windows 7 x64
OS
Windows 7 x64

My Computer My Computer

At a glance

Windows Seven x642.2 GHz Dual Core4GBATI Mobility RADEON HD 3470
Computer Manufacturer/Model Number
HP Pavilion dv5 Notebook PC
OS
Windows Seven x64
CPU
2.2 GHz Dual Core
Motherboard
Quanta 3600
Memory
4GB
Graphics Card(s)
ATI Mobility RADEON HD 3470
Sound Card
ATI
Monitor(s) Displays
Laptop
Hard Drives
ATA Hitachi HTS543215 (5400RPM)
Case
Laptop
Cooling
Fan
Internet Speed
Basic DSL 1.5 up and Down
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 Computer My Computer

At a glance

Windows 7 x64
OS
Windows 7 x64
I just copied my currently working web files to this dir and it worked just fine.
 

My Computer My Computer

At a glance

Windows 7 x64
OS
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 Computer My Computer

At a glance

Windows 7 x64
OS
Windows 7 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 Computer My Computer

At a glance

Windows Seven x642.2 GHz Dual Core4GBATI Mobility RADEON HD 3470
Computer Manufacturer/Model Number
HP Pavilion dv5 Notebook PC
OS
Windows Seven x64
CPU
2.2 GHz Dual Core
Motherboard
Quanta 3600
Memory
4GB
Graphics Card(s)
ATI Mobility RADEON HD 3470
Sound Card
ATI
Monitor(s) Displays
Laptop
Hard Drives
ATA Hitachi HTS543215 (5400RPM)
Case
Laptop
Cooling
Fan
Internet Speed
Basic DSL 1.5 up and Down
Back
Top