I getting a exception to retrieve session value in following condition.
in this situation system throw exception... but if i open site with http://www.example.com then working fine.
I have some questions
Putting it very simply, http://site.com and http://www.site.com are two separate sites. This is because of the way DNS is setup for a domain name. You can configure the DNS record for a domain name to point both at the same IP address, or you could use a URLRewrite rule to force traffic one way or the other.
Take a look at this for more info:
Specify a canonical domain name for your site with IIS 7
In the past many host servers created websites as subdomains under www., following THEN-current naming conventions.
We no longer need to do this.
There are no technical differences you will come across.
What matters is :
This can be done by:
CNAME is the DNS tag that maps an alias to the main name in the DNS record: in this case the "www." version of the name. With this solution surfers could include or exclude www. and reach the site either way.
Making changes in the .htaccess file. Few links for reference:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With