Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: Wed, 16 Jul 2008 13:56:00 -0700,    group: microsoft.public.dotnet.framework.webservices        back       


Unexpected values in the IncomingRequest.UriTemplateMatch.BaseUri   
I am making web service and wanted to create an output document that used a 
portion of the request URI in the output of the content. Anyway, I did find 
the BaseUri class within the the IncomingRequest.UriTemplateMatch, however, 
what was in there was not what I expected.

For example, if my service request was:
http://localhost/services/test.svc

I would have expected that the BaseUri would have been 
http://localhost/services/test.svc, however, the BaseURI was changed to 
http://[machinename].[host].[domain]/services/test.svc . 

Strictly speaking, I do not think is wrong, but I do not think that is 
should have been changed either. As my use for this was to determine how the 
client resolved this address, and it was resolved by “localhost” not 
“[machinename].[host].[domain]” (Yes, I know that local host is kinda 
special..) So I tested this from an external machine and had it point back to 
my dev box via IP, so the address was 
http://[xxx].[xxx].[xxx].[xxx]/services. Again, I was surprised, as the value 
in the BaseUri was again 
http://[machinename].[host].[domain]/services/test.svc.  Even the 
OrginalString property of the Uri was 
“http://[machinename].[host].[domain]/services/test.svc”, which is clearly 
wrong.

Anyway, I am very curious as to why this is done. I have taken to using a 
configuration property as I am distrustful of what I am getting back in the 
IncomingRequest object.

Is there another Uri property in the WCF context that has an unaltered 
version of the orginal request?

Thanks for any help…
date: Wed, 16 Jul 2008 13:56:00 -0700   author:   Kurt

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us