views:

349

answers:

1

I have a custom ASP.NET web site, it has code in App_Code and lots of dependencies in bin folder. Additionally, this web site should host InfoPath XmlFormView control. I also have custom authentication system, based on forms authentication (<authentication> and <authorization> are configured in web.config).

There is some documentation on hosting XmlFormView in custom environment (like this one - http://msdn.microsoft.com/en-us/library/aa701078.aspx), however I counldn't find any resources, describing our particular case.

I have the following problems:

  • App_Code and bin folders. Because of these, we cannot deploy our site to virtual directory (such as _layouts). I've solved this by setting up IIS application within SharePoint IIS web site. This seems to work, but is this correct?
  • Forms authentication. This is the hardest problem. It is not clear how to set it up correctly for custom web site, working in SharePoint context (so that XmlFormView would work). If I configure forms authentication in web.config of IIS application of SharePoint web site and configure SharePoint for anonimous access, XmlFormView cannot download some resources and crash with error. Also the problem is that I have to configure both whole SharePoint and forms library for anonimous access, otherwise I get access denied error. I don't really like to have my SharePoint web site having public anonimous access.

In general the question is – what is the correct way of hosting XmlFormView control in custom web site with .dlls in bin folder and code in App_Code folder and custom authentication, based on ASP.NET forms authentication.

Installed software:

  • Windows Server 2008
  • IIS 7
  • MOSS 2007
A: 

My workaround solution to this problem was to configure "container" SharePoint web site to use forms authentication too and to use SqlMembershipProvider in this configuration. It's important to use the same coookie name in both SharePoint web site and custom web site authentication configurations.

Konstantin

related questions