Got lost going from VS 2003 to VS 2008

Last post 12-04-2009 7:06 PM by chandu1256. 2 replies.

Sort Posts:

  • Got lost going from VS 2003 to VS 2008

    10-16-2009, 3:32 PM
    • Member
      387 point Member
    • dcwmorley
    • Member since 12-17-2003, 3:42 PM
    • UK
    • Posts 178

    Secure Log-in  using VS 2008

    (A)  In VS 2003 I created \Secure. Then in solution explorer I left buttoned the pages
    I wanted to hide (say, for example, Page21 and Page22) into \Secure.

    ( I Can't do this in VS 2008 you can't drag with left mouse button anymore - what should I do ?)

    (B)  I added a page login.aspx and login.aspx.vb with suitable code to compare paswords etc. Then I also dragged login into \secure

    (C)  At the top of login.aspx.vb I added <code> Imports System.Web.Security </code>

    (D)  I added a first snippet to web.config

    <code>

    <authorisation mode="Forms" >
    <forms name="Page21" login="secure\login.aspx>
    <forms name="Page22" login="secure\login.aspx>
    </authorisation>

    </code


    (E)  I added a second snippet right at the bottom so that the end of web.config read

    <code>

    </system.web>
    <location path="Secure">
    <system.web>
    <authorization>
    <deny users = "?"/>
    </system.web>
    </loation>
    </configuration>

    </code>

    At the moment web.config confuses me a lot. It's nothing like the VS 2003 version
    which I more of less understood. Even when I collapse some of the sections I need a map.

    I'm not sure what to put in the new web.config, and where to put it.

    Questions are : How do I get login, Page21 and Page 22 inside \Secure ?

     and

    what should be in web.config and where should it be ?

    and

    Is there anything else I need ?


  • Re: Got lost going from VS 2003 to VS 2008

    12-01-2009, 7:58 AM
    • Member
      387 point Member
    • dcwmorley
    • Member since 12-17-2003, 3:42 PM
    • UK
    • Posts 178

    (1) I never really figured out Forms Authentication under the new VS 2008 regime. For those few web sites where I have pages I want to hide, I have hard coded everything.

    I seem to have a blind spot. Probably I am repeating something which worked in VS 2003 and isn't necessary in the new regime.

    (2) In the matter of web.config : I initially tried converting my VS 2003 pages to VS 2008 by running a converter which you can find. This did not really work, and in particular it made a real mess of web.config. Even after I spaced it all out and compared it with other examples I was pretty unsure what I was looking at.

    (3) Rather than convert a VS 2003 web site, what I do now is to copy - paste all the .aspx and aspx.vb stuff on to Notepad documents. Then I rub out the original site completely and create a new one with a similar but not identical name. This means that you have a newly created web.config which does not give problems. Then I create the necessary pages and paste the code back again from Notepad. On the newly created .aspx pages, I retain the first line, but replace everything below this with the old stuff.

    (4) There are a few places, especially in the .vb stuff where the odd adjustment has to be made.

    I'm afraid some of the above probably looks a bit childish to an experienced hand, but I have little interest in the fine points of ASP.NET. "Does it work ?" is what I'm interested in.

    Even though Microsoft have made really heroic attempts in recent times to make their instructional documents more user-friendly, the keel of my mind still sometimes grounds on the rocks of their nomenclature.


    David Morley

  • Re: Got lost going from VS 2003 to VS 2008

    12-04-2009, 7:06 PM
    • Member
      7 point Member
    • chandu1256
    • Member since 12-04-2009, 2:52 PM
    • Posts 4

    In VS2008 you have an option of Creating Login by just dragging and dropping the Control

    Coming to pages 21 and 22 inside the secure page , as far as i know I was able to drag and drop them.

    Incase your are not able to do that  you can always create a new aspx file in Secure Folder and Paste the Same Code


Page 1 of 1 (3 items)