views:

38

answers:

2

Hi,

I am writing a web service in vb.net/asp.net 2, that needs user's name. It works fine when the url request is "www.mysite.com" but if any one has logged-in using "mysite.com" without a "www" and goes to the page that calls my web service, The HttpContext.Current.User.Identity.Name gives null.

How can I resolve this problem?

Many thanks,

A: 

How is this set up in IIS (assuming you are using IIS)?

One thing that would explain what you see would be that www.mystite.com and mysite.com are set up seperately within IIS and mysite.com is set to allow anonymous access; meaning no authentication takes place when hitting this url.

Rob Levine
Actually it is Dot Net Nuke version 4 and its host url is "www.mysite.com"
ramyadel
+3  A: 

If you are using forms authentication try setting the domain to mysite.com in the <forms> element.

Darin Dimitrov