Thanks for your respone Mike,
Glad that my suggstion is of assistance.
Please feel free to post here when you need any assistance.
Good luck!
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: AcXl4oxtgQ7WwwEGSHqbLZ5MuSGF5w==
| X-WBNR-Posting-Host: 195.80.17.131
| From: =?Utf-8?B?TWlrZSBPd2Vu?= <
[email protected]>
| References: <
[email protected]>
<
[email protected]>
| Subject: RE: Upgrading a web application to VS 2005
| Date: Thu, 10 Nov 2005 02:36:03 -0800
| Lines: 189
| Message-ID: <
[email protected]>
| 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!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:182053
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| 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?= <
[email protected]>
| > | Subject: Upgrading a web application to VS 2005
| > | Date: Wed, 9 Nov 2005 01:06:15 -0800
| > | Lines: 43
| > | Message-ID: <
[email protected]>
| > | 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
| > |
| >
| >
|