For Programmers: Free Programming Magazines  


Home > Archive > Visual Studio > November 2005 > Setup ASP.net Solution with existing asp.net site?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Setup ASP.net Solution with existing asp.net site?
Jason Hawthorne

2005-11-22, 7:02 pm

We have already created a asp.net intranet that has about 400 aspx,ascx
pages in it. The question is how do we setup visual studio to use this
existing website. We used macromedia before and all we had to do was
setup a site and point it at the directory, how do we accomplish this?

The layout of the site is a follows

|----SubSection
/---Non Public--|
| |----SubSection
| |
Root folder-----| |----SubSection
|
| |----SubSection
\---Public------|
|----SubSection

The Non Public uses the windows authentication, and the public side
requires no authentication. Each SubSection is basicaly a way for us to
keep each system seperate (ex. HR,Marketing,Administrative). Some pages
in each subsection use ascx file in a different subsection.

Public and NonPublic are setup as applications in IIS but the
subsections are not.

-
Jason
Cowboy \(Gregory A. Beamer\)

2005-11-22, 7:02 pm

As long as you have the web.config file(s) set up correctly for the
different types of sites, the different "roots", "sections" and
"subsections" become folders in the web project.

If you have different applications, for public and non-public (common with
different auth methods), set up three projects at different points in the
root and import the files from your DW project(s). You can have as many
projects as you desire in a single solution. This also gives you the option
of splitting into multiple solutions. It would be prudent to keep your
business logic out of the presentation layer.

Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

****************************************
*******
Think Outside the Box!
****************************************
*******
"Jason Hawthorne" <porous@nospam.postalias> wrote in message
news:MPG.1ded150ba1e5427989680@msnews.microsoft.com...
> We have already created a asp.net intranet that has about 400 aspx,ascx
> pages in it. The question is how do we setup visual studio to use this
> existing website. We used macromedia before and all we had to do was
> setup a site and point it at the directory, how do we accomplish this?
>
> The layout of the site is a follows
>
> |----SubSection
> /---Non Public--|
> | |----SubSection
> | |
> Root folder-----| |----SubSection
> |
> | |----SubSection
> \---Public------|
> |----SubSection
>
> The Non Public uses the windows authentication, and the public side
> requires no authentication. Each SubSection is basicaly a way for us to
> keep each system seperate (ex. HR,Marketing,Administrative). Some pages
> in each subsection use ascx file in a different subsection.
>
> Public and NonPublic are setup as applications in IIS but the
> subsections are not.
>
> -
> Jason



Jason Hawthorne

2005-11-22, 7:02 pm

Ok. I got my projects setup. I had to click the Show all files button
then select everything and choose include in project. Now I have a
different problem.

We created all our files in a single file format, no code-behind. I
realize we will have a lot of copy paste to do. But my question is how
can we just add a code behind file to an existing single file aspx page?
Everytime I create a codebehind file (aspx.vb) and set the codebehind in
the page (aspx) it doesn't show them as being linked in my solution
explorer.

In article <eSNppH57FHA.3416@TK2MSFTNGP15.phx.gbl>,
NoSpamMgbworld@comcast.netNoSpamM says...
> As long as you have the web.config file(s) set up correctly for the
> different types of sites, the different "roots", "sections" and
> "subsections" become folders in the web project.
>
> If you have different applications, for public and non-public (common with
> different auth methods), set up three projects at different points in the
> root and import the files from your DW project(s). You can have as many
> projects as you desire in a single solution. This also gives you the option
> of splitting into multiple solutions. It would be prudent to keep your
> business logic out of the presentation layer.
>
> Hope this helps.
>
>

Cowboy \(Gregory A. Beamer\)

2005-11-28, 7:02 pm

If you simply add the file and the appropriate CodeBehind= portion in the @
directive tag, you will be able to compile.

If I remember correctly, to get the link to show up in 1.1, you will have to
edit the project file. This is a shortcoming of the project system when
dealing with web projects.

I am not sure with 2.0, but I would assume it is either automagic (project
searched on open) or in the solution file (yuck).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

****************************************
*******
Think Outside the Box!
****************************************
*******
"Jason Hawthorne" <porous@nospam.postalias> wrote in message
news:MPG.1ded378f7b7933a989681@msnews.microsoft.com...[color=darkred]
> Ok. I got my projects setup. I had to click the Show all files button
> then select everything and choose include in project. Now I have a
> different problem.
>
> We created all our files in a single file format, no code-behind. I
> realize we will have a lot of copy paste to do. But my question is how
> can we just add a code behind file to an existing single file aspx page?
> Everytime I create a codebehind file (aspx.vb) and set the codebehind in
> the page (aspx) it doesn't show them as being linked in my solution
> explorer.
>
> In article <eSNppH57FHA.3416@TK2MSFTNGP15.phx.gbl>,
> NoSpamMgbworld@comcast.netNoSpamM says...


Jason Hawthorne

2005-11-29, 7:03 pm

When I included files into my project it asked if I wanted to creat the
class file for them. So I clicked yes and it created a seperate class
file for every single page. Which is nice because now I can just copy
the code.

But I get an error on page load. It says "Could not load type
'projectname.filename'". I can see that the codebehind page it actually
a class and it looks like the aspx file is trying to call the class but
cannot load the file for some reason. Any ideas?

In article <Oq9xnhC9FHA.636@TK2MSFTNGP10.phx.gbl>,
NoSpamMgbworld@comcast.netNoSpamM says...
> If you simply add the file and the appropriate CodeBehind= portion in the @
> directive tag, you will be able to compile.
>
> If I remember correctly, to get the link to show up in 1.1, you will have to
> edit the project file. This is a shortcoming of the project system when
> dealing with web projects.
>
> I am not sure with 2.0, but I would assume it is either automagic (project
> searched on open) or in the solution file (yuck).
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com