in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

SharePoint Squared - Rodney Langley's SharePoint Weblog

My thoughts, questions, suggestions and solutions for everything SharePoint, and other Microsoft products. Maybe an occasional snippet on real life as well.

Workflows, SSPs, and IIS Nightmares

What a week! 

I have had many challenges throughout my IT carrer, but this week has to rank near the top as one of the most stressful. I decided to take an offer with a new company, and turned in my 2 week notice. I hate leaving loose ends, and definitely don't want to leave my present company in bind, so I have a few projects that I wanted to complete before I left. Well, one of those projects included creating a workflow for a custom list for one of our departments. When I saved the workflow to the server and created a new record to test it, I found that it wasn't working. "Failed on Start" was all that was showing.

 

I looked at the code and everything checked out so I dug a little deeper and found that NONE of the workflows were working throughout the entire portal! ARGH! What happened? I started digging through the log files and they weren't much help at all. This is the only thing that was showing for workflows:

 

2/2007 14:11:51.52 w3wp.exe (0x10A8)                              0x05BC         CMS                                     Publishing                        7fz4    High             WARNING: Cannot change FormContext.FormMode to [Invalid] because it is already set to [Edit] 

 

08/02/2007 14:11:55.05     w3wp.exe (0x10A8)                              0x0EB4         Windows SharePoint Services       Workflow Infrastructure             72fs    Unexpected  RunWorkflow: System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow workflow, Int32 runAsUserId, String associationData, String initiationData)     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow workflow, SPWorkflowEvent e)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)      

   

08/02/2007 14:11:55.05     w3wp.exe (0x10A8)                              0x0EB4         Windows SharePoint Services       Workflow Infrastructure             98d7   Unexpected  System.ArgumentException: Value does not fall within the expected range.     at Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow workflow, Int32 runAsUserId, String associationData, String initiationData)     at Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow workflow, SPWorkflowEvent e)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)     at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)        

 

Well, to back track a little and set the scene, I had an issue a couple of weeks ago that caused me to have to do a restore from backup.  Upon the restore, I got my usernames for the shared services and application pools a litlte mixed up and wound up assigning the wrong username to the main portal app pool. To the best of my knowledge, they have the same permissions, but apparently one is missing something somewhere. (There's a lot of permissions to set on a farm implementation) I attempted to change it using the Central Admin interface, but to no avail. It didn't change in IIS. So, against the grain (totally taboo in the MOSS world), I tried to change the username and password for the main application pool in IIS. I clicked apply, ok, then did an IISRESET, and went back to check it at WHAM! Somehow, miraculously, it had changed itself back to the previous username and password! How is that possible? After a week of beating myself up over this, and hoping that it was somehow related to my worfklow issue, I called Microsoft Premier Support.  The fellow I spoke with was very knowledgeable and friendly, but had never seen this issue before either. We spent 3.5 hours working on it one day and another 3 hours the following day. We found that if we created a new app pool in IIS and assigned the main web application in SharePoint to that pool with the proper identity, workflows started working!! However, I digress..

 

That was not satisfactory as it was not supported by the MS team. So we deleted that app pool, and proceeded to delete the current web application using the Central Admin tool and recreate it, attaching the current content DB.  Once done, the workflows were broken again! We checked the IIS app pool and it was back to the wrong identity! We tried changing it manually with the same result as before, failure after IISRESET.  He put me on mute while he discussed options with colleagues because we were all bumfuzzled at that time. While I was waiting,  I started skimming through my MOSS Administrator's Companion and stumbled on a section instructing someone on how to change the username and password for an SSP. I thought to myself, "Surely, you've checked that, but let's do it again just in case..." Sure enough, there was the SSP credentials running under the same username as the app pool. I changed it to the correct one, did the same for the main app pool in IIS, did another IISRESET and BOOYAH! IT WORKED!!!!

 

So Ladies and Gentlemen, the morale of the story is this: If you do a restore from backup, make sure to use the same usernames and password for everything, but if you don't, change the username and pass for the main SSP, change it for IIS, and reset and you'll be back to normal. On one hand, I love SSPs for the additional load balancing functionallity, but they are truly a pain in the rear.

 

I hope this helps someone, if so please feel free to leave feedback/comments!


Rod

Published Aug 04 2007, 10:06 AM by misterbeefy
Filed under: , , ,

Comments

 

Links (8/5/2007) « Steve Pietrek’s SharePoint Stuff said:

Pingback from  Links (8/5/2007) « Steve Pietrek’s SharePoint Stuff

August 5, 2007 7:23 PM
 

28 Links Today (2007-08-06) said:

Pingback from  28 Links Today (2007-08-06)

August 6, 2007 10:26 AM
 

Mak_sim said:

Man, you've saved me... thanks :)

September 6, 2007 2:04 AM
 

txs8311 said:

Had a similar issue - thanks for the post!

September 18, 2007 6:06 PM
 

Dor Rotman said:

Hi Rodney,

It is always advised to change credentials through the SharePoint Central administration, and touch IIS as least as possible.

See this article for a batchfile that does that:

support.microsoft.com/.../934838

September 23, 2007 7:41 AM
 

Rodney said:

Dor, you're absolutely correct. That was one of the points I was trying to make with this post, but thanks for the link, it's good information!

September 24, 2007 6:46 AM
 

Daman said:

Hi Rodney

I un-installed Sharepoint 3.0 from my machine, and installed it again. While configuring this, I'm getting Access Denied error.

Following are the details:

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

  at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)

  at Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage)

  at Microsoft.SharePoint.SPWeb.InitWeb()

  at Microsoft.SharePoint.SPWeb.get_WebTemplate()

  at Microsoft.SharePoint.SPEvaluatorModeProvisioning.TryGetIsSiteProvisioned(String template, String relativePath, Nullable`1 port, SPSite& provisionedSite, SPWeb& provisionedWeb, Uri& provisionedUri)

  at Microsoft.SharePoint.PostSetupConfiguration.WelcomeForm.ShowNextFormForServerRoleSingleServer()

  at Microsoft.SharePoint.PostSetupConfiguration.WelcomeForm.PsconfigBaseFormNextButtonClickedEventHandler(Object sender, EventArgs e)

  at System.Windows.Forms.Control.OnClick(EventArgs e)

  at System.Windows.Forms.Button.OnClick(EventArgs e)

  at System.Windows.Forms.Button.WndProc(Message& m)

  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

I have tried few things i could find over internet, but nothing is helping.

I'm admin on my machine, and I have used default settings while installing sharepoint. Also i have all the rights on the local SQL server as well. What surprises me is that this was installed by somebody earlier, who too was admin, just like me.

Thanks

Daman

daman.badesha@yahoo.com

March 1, 2008 7:03 PM
 

Daman said:

Hi

Resolved this issue. Posting this for any other person who might be in same trouble.

Error:

System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

 at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)

Resolution Steps:

- Run Administrative Tools > Sharepoint Central Administration

- Go to Application Management > Sharepoint Site Management > Site Collection Administrations

- Check if your name (the person configuring sharepoint) is primary or secondary administration

Regards

Daman

March 1, 2008 7:47 PM
 

Jan Vratislav, CZ said:

You saved my life!!!! :-) Thanx

July 4, 2008 6:18 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

About misterbeefy

Rodney Langley, MCSE, MCTS, Security+ is a Senior Microsoft SharePoint Architect and Consultant for Fujitsu Consulting. He specializes in WSS 3.0 and MOSS 2007 architecture and development., as well as other Microsoft technologies. He has been in the IT profession since 1996, and worked with a variety of industries. He is an active member of the SharePoint community, contributing in a variety of user forums including SharePoint University, and the MSDN forums.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts