Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to make a authentication WebPart. For this, i used tghios tutorial: http://blogs.codes-sources.com/anouvel/archive/2010/09/18/sharepoint-2010-d-velopper-une-web-part-d-authentification-pour-une-page-d-accueil.aspx

But this line doesn't work and return me a Null: SPIisSettings settings = webApp.IisSettings[SPContext.Current.Site.Zone];

I don't understand why?

May be somebody Can Help me.

Thanks.

share|improve this question
    
Can you try using ULS viewer and find any related errors –  SharePointer Sep 7 '12 at 8:19
    
also can you check if your getting anything for "SPContext.Current.Site.Zone" or if its null –  SharePointer Sep 7 '12 at 11:19
add comment

1 Answer

try this instead, might help

 SPIisSettings iisSettings = this.webApp.IisSettings[this.zone];

OR use this one

SPUrlZone.Default 

instead of "this.zone"

share|improve this answer
    
I've got an erreor message: My Webpart doesn't contain a defintion for Zone. I miss something? –  Julio Sep 7 '12 at 8:38
    
Zone is just part of page where you add your webpart to, so don't think that is the problem –  SharePointer Sep 7 '12 at 8:52
    
Sorry I don't have a zone property on my object this. –  Julio Sep 7 '12 at 9:34
    
sorry I was confused so ignore my 1st comment, I guess you need to create a new zone maybe, check this link out technet.microsoft.com/en-us/library/cc262350.aspx –  SharePointer Sep 7 '12 at 10:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.