1
Vote

Site collection Host header

description

When we are using an web application without host headers and use site collection host headers we get an Object reference not set to an instance of an object.
After looking at the code of the file 'autosignin.aspx.cs' there are 2 rows to get the zone of the current url. but this one is empty.
So instead of using these 2 rows
        SPAlternateUrl u = app.AlternateUrls[Request.Url];
        SPUrlZone zone = u.UrlZone;
We can get the zone from the SPContext.Current.Site.Zone. so the 2 rows above can be replaces by the following row
        SPUrlZone zone = SPContext.Current.Site.Zone;

comments