By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,115 Members | 898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,115 IT Pros & Developers. It's quick & easy.

Alternatives to Application_BeginRequest()

P: n/a
Hi guys

I've used an Application_BeginRequest function in my global.asax page to
implement some URL rewriting functionality on our website.

However, upon moving it to my host (1&1.co.uk), it no longer works. They
don't support Application_BeginRequest?

They've given me a list of the low-level functions they do support, which
can be viewed at http://s221042302.websitehome.co.uk/check.aspx

Could someone give me an idea as to whether any of those functions will do a
similar job to Application_BeginRequest, to allow me to use url rewriting.

Alternatively, can someone provide a method to do the rewrites in C#? I need
to be able to access my sql server for the rewrite.

Thanks,

Dan
Dec 4 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
There are several ways you can use to acheive URL rewritting without using
the Global methods.
For a detailed explanation of the possible approaches try ScottGu's blog at
http://weblogs.asp.net/scottgu/archi...l-rewriting-wi
th-asp-net.aspx

Hope this helps.

--------------------
>Thread-Topic: Alternatives to Application_BeginRequest()
thread-index: Acg2hucOuQmtoH6STqWR77GjeWzPuA==
X-WBNR-Posting-Host: 172.159.105.252
From: =?Utf-8?B?bXVzb3NkZXY=?= <mu*******@community.nospam>
Subject: Alternatives to Application_BeginRequest()
Date: Tue, 4 Dec 2007 07:04:01 -0800
Lines: 22
Message-ID: <3E**********************************@microsoft.co m>
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.2992
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.dotnet.framework.aspnet:52351
NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi guys

I've used an Application_BeginRequest function in my global.asax page to
implement some URL rewriting functionality on our website.

However, upon moving it to my host (1&1.co.uk), it no longer works. They
don't support Application_BeginRequest?

They've given me a list of the low-level functions they do support, which
can be viewed at http://s221042302.websitehome.co.uk/check.aspx

Could someone give me an idea as to whether any of those functions will do
a
>similar job to Application_BeginRequest, to allow me to use url rewriting.

Alternatively, can someone provide a method to do the rewrites in C#? I
need
>to be able to access my sql server for the rewrite.

Thanks,

Dan
--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.

Dec 4 '07 #2

P: n/a
Hi

Thanks for the info. I've read Scott's post before - that is in fact how I
came to use BeginRequest :)

I've just tried switching the code to run in the
Application_PreRequestHandlerExecute.

It does fire, but when I then use HttpContext.Current.RewritePath, it
doesn't seem to send it through the asp.net engine, and I end up with all my
page code displayed in my browser.

Is it possible to fix this? if so, how?

Alternatively, what function from the list I gave can I use that will allow
me to use RewritePath as I am currently doing in my BeginRequest() handler?!

Thanks,

"Nanda Lella[MSFT]" wrote:
There are several ways you can use to acheive URL rewritting without using
the Global methods.
For a detailed explanation of the possible approaches try ScottGu's blog at
http://weblogs.asp.net/scottgu/archi...l-rewriting-wi
th-asp-net.aspx

Hope this helps.

--------------------
Thread-Topic: Alternatives to Application_BeginRequest()
thread-index: Acg2hucOuQmtoH6STqWR77GjeWzPuA==
X-WBNR-Posting-Host: 172.159.105.252
From: =?Utf-8?B?bXVzb3NkZXY=?= <mu*******@community.nospam>
Subject: Alternatives to Application_BeginRequest()
Date: Tue, 4 Dec 2007 07:04:01 -0800
Lines: 22
Message-ID: <3E**********************************@microsoft.co m>
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.2992
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl microsoft.public.dotnet.framework.aspnet:52351
NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi guys

I've used an Application_BeginRequest function in my global.asax page to
implement some URL rewriting functionality on our website.

However, upon moving it to my host (1&1.co.uk), it no longer works. They
don't support Application_BeginRequest?

They've given me a list of the low-level functions they do support, which
can be viewed at http://s221042302.websitehome.co.uk/check.aspx

Could someone give me an idea as to whether any of those functions will do
a
similar job to Application_BeginRequest, to allow me to use url rewriting.

Alternatively, can someone provide a method to do the rewrites in C#? I
need
to be able to access my sql server for the rewrite.

Thanks,

Dan

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no rights.

Dec 5 '07 #3

P: n/a
Hi Dan,

As for the web host, I suggest you confirm the following things with them:

** As they said "BeginRequest" event is not supported(and you found your
beginrequest code in global.asax not supported), you can ask them whether
it is "BeginRequest" not supported or any global events in Global.asax that
is not supported?

For BeginRequest, you can also writer a custom httpmodule, you can try it:

#How To Create an ASP.NET HTTP Module Using Visual C# .NET
http://support.microsoft.com/kb/307996/EN-US/

BTW, for the following page, I've checked it. It seems it is a simple
ASP.NET trace page and I can only find some page level events there, are
these page events the ones that web host support? Page events won't help
much for URL Rewriting:

http://s221042302.websitehome.co.uk/check.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?bXVzb3NkZXY=?= <mu*******@community.nospam>
References: <3E**********************************@microsoft.co m>
<Rr**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Alternatives to Application_BeginRequest()
Date: Wed, 5 Dec 2007 05:15:00 -0800
>
Hi

Thanks for the info. I've read Scott's post before - that is in fact how I
came to use BeginRequest :)

I've just tried switching the code to run in the
Application_PreRequestHandlerExecute.

It does fire, but when I then use HttpContext.Current.RewritePath, it
doesn't seem to send it through the asp.net engine, and I end up with all
my
>page code displayed in my browser.

Is it possible to fix this? if so, how?

Alternatively, what function from the list I gave can I use that will
allow
>me to use RewritePath as I am currently doing in my BeginRequest()
handler?!
>
Thanks,

"Nanda Lella[MSFT]" wrote:
>There are several ways you can use to acheive URL rewritting without
using
>the Global methods.
For a detailed explanation of the possible approaches try ScottGu's blog
at
>>
http://weblogs.asp.net/scottgu/archi...l-rewriting-wi
>th-asp-net.aspx

Hope this helps.

--------------------
>Thread-Topic: Alternatives to Application_BeginRequest()
thread-index: Acg2hucOuQmtoH6STqWR77GjeWzPuA==
X-WBNR-Posting-Host: 172.159.105.252
From: =?Utf-8?B?bXVzb3NkZXY=?= <mu*******@community.nospam>
Subject: Alternatives to Application_BeginRequest()
Date: Tue, 4 Dec 2007 07:04:01 -0800
Lines: 22
Message-ID: <3E**********************************@microsoft.co m>
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.2992
Newsgroups: microsoft.public.dotnet.framework.aspnet
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.dotnet.framework.aspnet:52351
>NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi guys

I've used an Application_BeginRequest function in my global.asax page
to
>implement some URL rewriting functionality on our website.

However, upon moving it to my host (1&1.co.uk), it no longer works.
They
>don't support Application_BeginRequest?

They've given me a list of the low-level functions they do support,
which
>can be viewed at http://s221042302.websitehome.co.uk/check.aspx

Could someone give me an idea as to whether any of those functions will
do
>a
>similar job to Application_BeginRequest, to allow me to use url
rewriting.
>
Alternatively, can someone provide a method to do the rewrites in C#? I
need
>to be able to access my sql server for the rewrite.

Thanks,

Dan

--

Thank You,
Nanda Lella,

This Posting is provided "AS IS" with no warranties, and confers no
rights.
>>
Dec 6 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.