Methods missed

  • Thread starter Thread starter Erick
  • Start date Start date
E

Erick

Hi,

I'm implementing a IHttpModule.

I get the Context object like this:

HttpContext m_HttpContext = (HttpContext)((HttpApplication)
sender).Context);

this is done on the BeginRequest event of the Custom
module when I try to access the following statemen:

m_HttpContext.Request.Path.EndsWith("Login.aspx");

I did not receive any error at the compile or run time but
if I debug and watch this sentence I see this text into
the value field of the watcher.

error: 'm_HttpContext.Request.Path.EndsWith' does not exist

Looks that the EndsWith method is not recongnized for the
Path string object contained into the Request object.

Does any know what is going on?

Regards...
 
What about all the other properties, do they contain the expected values?
Does Path contains something? How about Request? What I am getting at is
that you should make sure that the error is actually applying to the
EndsWith, and not something that came before it.
 
Thanks Peter for you response.

As you know the Path property of the Request object is a
String object which has the the defined methos (i.e.
EndWith(), GetTyep(), Clone(), CompareTo(), ToString()) to
work with the string object but none of this methods works.

The Path property has a value like /app/file.aspx

I already tryed to set it to a string like

string vValue = m_HttpContext.Request.Path;

vValue.EndsWith("file.aspx") but again i see the message
into the watcher the same error: 'vValue.EndsWith' does
not exist

Thanks..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Methods missed 2
question regarding this httpmodule 3
Back to issue with httpmodule 2
problem with httpmodule 7
CheckVirtualFileExists 2
IHttpModule 2
HTTP Modules 1
Multi-threaded HTTP Module 2

Back
Top