RE: Upgrading a web application to VS 2005



Steve,

Thanks for replying to my post.

Following the information you gave me, I have now found the missing code -
It is in the App_Code folder as you suggested!

Also I have found the reason for the fact it produced this error when
compiling. The code uses this call in inline code (not originally coded by
me I hasten to add!), i.e.

'<A href="<%= Global.GetApplicationPath(Request) %>/Desk ........'

and the VS 2003 to VS 2005 converter seems to ignore this, and therefore
produces and error when it changes

'Global.App...' to '[Global].App...',

but does not also change the calls from the inline code!

Thanks also for the upgrade reference material. It looks to be just what I
need.

I am sure I will be posting again soon!

;-)


Cheers, Mike.


"Steven Cheng[MSFT]" wrote:

> Hi Mike,
>
> From your description, after you converting a VBNET web project from VS2003
> to VS2005, some page code which refererncing a static function in the
> global class can not pass the compilation , yes?
>
> Based on my local test, I put the same "GetApplicationPath" function in my
> vb.net projet's global class , then use in a page like:
> ========
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Response.Write("<br>ApplicationPath: " &
> Global.GetApplicationPath(Request))
> End Sub
> =========
> After converting in VS.NET 2005, the above code is converted to:
> =========
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Response.Write("<br>ApplicationPath: " &
> [Global].GetApplicationPath(Request))
>
> End Sub
> ============
> Which can also get compiled correctly. So what's the detaild code which
> reference that function get broken in new 2.0?
>
> In addition, regarding on your questions, here are some of my understanding:
>
> 1/ Where has all this code gone as the compiler can no longer find it?
> ==================
> As for ASP.NET 2.0 project in VS.NET 2005, all code files (except the aspx
> page's codebehind) will be moved to the App_Code folder (which is used for
> dynamic compilation). So I think you can find your Global.asax.vb there.
>
>
>
> 2/ Where is the 'Application_AuthenticateRequest' code and other code that
> was also in the Global.asax.vb file?
> ==================
> The "Application_AuthenticateRequest" function is still there in the
> Global.asax.vb file which under the "App_Code" folder.
>
>
>
> 3/ Is there another place that such code is held or should I just add it
> back into the app in VS 2005?
> ==================
> I think that's the "App_Code" folder.
>
>
>
> 4/ Lastly, but not least is there a white paper or other such document
> that
> would guide me through the changes that I have to make to a VS 2003 app to
> make it compatible with VS 2005?
> ==================
> Basically since VS.NET 2005 IDE is just a tool which simplify our work on
> building asp.net 2.0 web application, so the main changes you met should
> come from the change from asp.net 1.x to asp.net 2.0. Not sure whether
> you've already read some upgrade and migration reference on the MSDN
> ASP.NET 2.0 dev center, you can get some useful information there:
>
> Upgrade from ASP.NET 1.x
> http://msdn.microsoft.com/asp.net/reference/migration/upgrade/default.aspx
>
>
> Hope helps. Thanks,
>
> Steven Cheng
> Microsoft Online Support
>
> Get Secure! www.microsoft.com/security
> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>
>
>
> --------------------
> | Thread-Topic: Upgrading a web application to VS 2005
> | thread-index: AcXlDNaeeiCgdrXvSImm3wyRJhj47Q==
> | X-WBNR-Posting-Host: 195.80.17.131
> | From: =?Utf-8?B?TWlrZSBPd2Vu?= <whatnospam@xxxxxxxxxxxxx>
> | Subject: Upgrading a web application to VS 2005
> | Date: Wed, 9 Nov 2005 01:06:15 -0800
> | Lines: 43
> | Message-ID: <9EC75C57-4A24-4576-B2DB-1649865674AA@xxxxxxxxxxxxx>
> | MIME-Version: 1.0
> | Content-Type: text/plain;
> | charset="Utf-8"
> | Content-Transfer-Encoding: 7bit
> | X-Newsreader: Microsoft CDO for Windows 2000
> | Content-Class: urn:content-classes:message
> | Importance: normal
> | Priority: normal
> | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> | Newsgroups: microsoft.public.dotnet.general
> | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
> | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
> | Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:181977
> | X-Tomcat-NG: microsoft.public.dotnet.general
> |
> | Hi,
> |
> | I have just used the import Wizard to import a VS 2003 app to VS 2005.
> |
> | I have a lot of work to do to enable it to compile successfully with all
> the
> | errors and warnings it gave me, but as a starting point the compiler can
> no
> | longer find the function as at the bottom of this posting, that was in
> the
> | Global.asax.vb file.
> |
> | All the function does is give an easy / quick way of getting the
> application
> | path.
> |
> | My questions are:
> |
> | 1/ Where has all this code gone as the compiler can no longer find it?
> |
> | 2/ Where is the 'Application_AuthenticateRequest' code and other code
> that
> | was also in the Global.asax.vb file?
> |
> | 3/ Is there another place that such code is held or should I just add it
> | back into the app in VS 2005?
> |
> | 4/ Lastly, but not least is there a white paper or other such document
> that
> | would guide me through the changes that I have to make to a VS 2003 app
> to
> | make it compatible with VS 2005?
> |
> |
> | Thanks, Mike.
> |
> |
> | Public Shared Function GetApplicationPath(ByVal request As
> | HttpRequest) As String
> | Dim path As String = String.Empty
> | Try
> | If request.ApplicationPath <> "/" Then
> | path = request.ApplicationPath
> | End If
> | Catch e As Exception
> | Throw e
> | End Try
> |
> | Return path
> | End Function 'GetApplicationPath
> |
>
>
.



Relevant Pages

  • Re: Question about Class Helpers
    ... Damn - Pascal lovers, i suddenly realize, that there is 2 stories, i have ... This machine was a high availability machine. ... compiler at the lower levels, and only had to upgrade the 'main' compiler ...
    (borland.public.delphi.non-technical)
  • Re: How to move a program from sco openserver 5.04 to newer platform
    ... I understand that recompiling with a more modern compiler may generate ... posts "I have an antique version of OSR5 and want to upgrade the box," ... simply copied from old system to new system each time a hardware and OS ... so I don't mess with them. ...
    (comp.unix.sco.misc)
  • Re: KEil bought by ARM
    ... >> * If you upgrade your machines and the dongle doesn't work with your ... $Multi-K for the latest compiler version. ... > maker of your car to upgrade it free of charge for you when YOU decide to ... Many moons ago seed production was just the farmer collecting seeds from ...
    (comp.arch.embedded)
  • Re: RH9 and gcc version problem
    ... >>old compiler and install the new one, or is there a way to just upgrade ... > downgrade the compiler, not upgrade it. ... You are right in that I need to downgrade my compiler rather than ...
    (comp.os.linux.development.system)
  • Re: Why is dynamic polymorphism so useful?
    ... At some point in a program we assign to ref_var a reference to some ... Say we start this app and while app is already running, ... The already running app has to be flexible enough to enable an object ... Perhaps because creators of Java decided compiler doesn’t have to know ...
    (comp.lang.java.programmer)

Quantcast