Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

How to open downloaded SLN file?

Hi there,

Been developing with c# for quite a bit now but can't believe I can't figure this one!

When I develop a new c# asp.net website, Visual Studio .Net creates me a nice new virtual directory on the server and all files I add are autoamtically addeded to th project

Now I downloaded an open source asp.net application (zip file), it comes with everything

.csproj
.sln
.cs
.aspx
etc etc

So great, I unzipped it to my local hard drive and tried to open the SLN (solution file),.,, but everytime i do it says (between the ----------)

-------------
"The default web access mode for this project is set to file share, but the project folder at http://localhost/ndcms cannot be opened with the path "c:\inetpub\wwwroot\ndCMSD".

"Unable to open web project"

Retry using a different file share path
Try to open the project with frontpage server extension
-------------

I sort of understand this, yes it can't find the source files etc on my local IIS. My question is what is the best way to copy local files into the IIS, just copy them into the directory  on IIS and the create a virtual directory? But will that mean the .SLN file is now invalid??

Where is the path name "c:\inetpub\wwwroot\ndCMSD" stored??

I know its pretty normal to have IIS on localhost, BUT i have a seperate server named server1 which is local to my LAN.

To cut a long story short, i am looking for the best way to convert the files extracted from the ZIP into my IIS file.

I thought there would be an import or similar??

Ian
0
ianinspain
Asked:
ianinspain
  • 3
  • 2
1 Solution
 
ihenryCommented:
When you have a "total stranger" web project in your machine, don't bother to try to open using VS.NET. It won't let you until you create one virtual directory that points to the project folder. So what you need to do here is either

1. Open IIS snap-ins and create a virtual directory that points to the web project folder,
2. or right click on the folder (ndCMSD), select "Web Sharing" tab, and continue with select "Share this folder" option button will open "Edit Alias" dialog window. Enter an alias name and leave other settings as default, then press OK button.

NOTE:
The virtual directory "Application Name" (no.1) or the "Alias name" (no.2) must be the same with URLPath setting in <project_name>.csproj.webinfo file and "Project" setting in the .sln file.

To know what is URLPath in <project_name>.csproj.webinfo and "project" in .sln file open the two files using notepad.
0
 
ianinspainAuthor Commented:
Superb! Works perfect... I chose option 1.. Create a new vitual directory in IIS... right clicked it and clicked create... on my directory... Superb!

I am quite interested in what <project_name>.csproj.webinfo is.. which i did edit, do you know where i can find info with regards to format/contents of <project_name>.csproj.webinfo and .sln file??

Also do you know what the difference with web sharing tab is to creating a new virtual directory?? They appear to be a little different...

Thanks very much for the info..

Ian
0
 
ianinspainAuthor Commented:
Also .. i do get an error message, it isn't a problem i know.. but vs.net says that it believes that the project(solution used to be under Source Control as a file is missing... It says no problem, it will treat the solution/project/files that were under source control as if they are not..

So i know its nothing to worry about, but are you aware where this information is stored, something is still telling it that it is under source control even though i have done a Save ALL, Save Solution, Save Project... If i close it down again and re-open .. it still thinks its under source control.

There is no MSSCCPRJ.SCC in the directory on the server or my project directory

Just though you may know?

Thanks once again..

Ian
0
 
ihenryCommented:
>> ...what the difference with web sharing tab is to creating a new virtual directory??...
As a matter of fact, I don't see any difference when create a web folder either using IIS console or Windows Explorer. Except, IIS provides more functionatilies on security nd http request handling.

As you read the following article, you'll find there's actually the 3rd way:
http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/Default.asp?url=/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/qss_wss_virtdirectories.asp

>>  ...am quite interested in what <project_name>.csproj.webinfo is...
Most of the time, you shouldn't have needs to modify the .csproj.webinfo and .sln files directly. I learnt the project files structure by experience, project by project. Sometimes for some reasons it's inevitable (I would say) to hack the files to make my life easier.

>> ...i do get an error message..
That because the project was created or added to the solution using VSS. I know exactly what's the error message, but you still can continue working with VS.NET after press a button and close the dialog window, right? :o)

>> ..There is no MSSCCPRJ.SCC in the directory...
This is my suggestion to get rid from the annoying VSS error message
1. Remove the .sln file. Don't worry, you can re-create again easily.
2. Open the .csproj with notepad, and you'll find something similar with this config

<VisualStudioProject>
    <CSHARP
        ProjectType = "Web"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{CA0B5B92-04E2-428D-8BE8-56C30C760D20}"
        SccProjectName = "SAK"
        SccLocalPath = "SAK"
        SccAuxPath = "SAK"
        SccProvider = "SAK"
    >
Remove the lines which contain SccProjectName, SccLocalPath, SccAuxPath and SccProvider. Save and close the file.

3. Double click the csproj file and open it via VS.NET
4. Click on the menu File->Save All. Then VS.NET will prompt you to save a new solution file. Give a name and save.

And one more reading for your original question.
http://www.kbalertz.com/kb_Q326497.aspx
0
 
ianinspainAuthor Commented:
Hi ihenry!

Superb!, yep ... acutally I just edited the proj file in notepad and removed

        SccProjectName = "SAK"
        SccLocalPath = "SAK"
        SccAuxPath = "SAK"
        SccProvider = "SAK"

Didn't delete the sln... left it.. and all works well..

Thanks for all your help on this, got me out a jam... perfect

Assigning points ,... thanks!

Ian
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now