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


  1. Posts : 6
    Windows 7 x64
       #1

    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 Computer


  2. Posts : 428
    Windows Seven x64
       #2

    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 Computer


  3. Posts : 6
    Windows 7 x64
    Thread Starter
       #3

    Ryan2320 said:
    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 Computer


  4. Posts : 428
    Windows Seven x64
       #4

    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


  5. Posts : 6
    Windows 7 x64
    Thread Starter
       #5

    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


  6. Posts : 428
    Windows Seven x64
       #6

    ugean said:
    ... 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 Computer


  7. Posts : 6
    Windows 7 x64
    Thread Starter
       #7

    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


  8. Posts : 6
    Windows 7 x64
    Thread Starter
       #8

    I just copied my currently working web files to this dir and it worked just fine.
      My Computer


  9. Posts : 6
    Windows 7 x64
    Thread Starter
       #9

    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


  10. Posts : 428
    Windows Seven x64
       #10

    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


 

  Related Discussions
Our Sites
Site Links
About 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 19:20.
Find Us