Visual Studio can't start or debug Sitefinity. Only works with Sitefinity Project Manager
My goal is to debug an existing Sitefinity project in Visual Studio.
Sitefinity wouldn't start up on my localhost developer machine for both Start Debugging and Start Without Debugging.
----------------------------------------
Timestamp: 10/25/2012 12:06:24 AM
Message: HandlingInstanceID: b514f00f-928a-4553-b969-ac00d8c98ba5
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
10/24/2012 20:06:24
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Invalid type specified Telerik.Sitefinity.Security.Data.RoleDataProvider
Source : Telerik.Sitefinity
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : TProviderBase InstantiateProvider(Telerik.Sitefinity.Configuration.IDataProviderSettings, System.Type, Telerik.Sitefinity.Abstractions.ExceptionPolicyName, Telerik.Sitefinity.Data.ManagerBase`1[TProviderBase])
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
Additional Info:
MachineName : MyMachineName
TimeStamp : 10/25/2012 12:06:24 AM
FullName : Telerik.Sitefinity.Utilities, Version=5.2.3700.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : 46f3d28e-1-129955971558454018
ThreadIdentity :
WindowsIdentity : Domain\MyUserName
Requested URL : localhost:11990/.../default.aspx
Category: ErrorLog
Priority: 0
EventId: 9010
Severity: Warning
Title:Enterprise Library Exception Handling
Machine: MyMachineName
App Domain: 46f3d28e-1-129955971558454018
ProcessId: 9264
Process Name: C:\Program Files (x86)\Telerik\Sitefinity 5.2\Sitefinity.exe
Thread Name:
Win32 ThreadId:9244
Extended Properties:
----------------------------------------
----------------------------------------
Timestamp: 10/25/2012 12:06:24 AM
Message: HandlingInstanceID: c5927f67-8fe2-48d4-8101-376fb8c29c07
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
10/24/2012 20:06:24
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Invalid type specified Telerik.Sitefinity.Security.Data.MembershipDataProvider
Source : Telerik.Sitefinity
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : TProviderBase InstantiateProvider(Telerik.Sitefinity.Configuration.IDataProviderSettings, System.Type, Telerik.Sitefinity.Abstractions.ExceptionPolicyName, Telerik.Sitefinity.Data.ManagerBase`1[TProviderBase])
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
Additional Info:
MachineName : MyMachineName
TimeStamp : 10/25/2012 12:06:24 AM
FullName : Telerik.Sitefinity.Utilities, Version=5.2.3700.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : 46f3d28e-1-129955971558454018
ThreadIdentity :
WindowsIdentity : Domain\MyUserName
Requested URL : localhost:11990/.../default.aspx
Category: ErrorLog
Priority: 0
EventId: 9010
Severity: Warning
Title:Enterprise Library Exception Handling
Machine: MyMachineName
App Domain: 46f3d28e-1-129955971558454018
ProcessId: 9264
Process Name: C:\Program Files (x86)\Telerik\Sitefinity 5.2\Sitefinity.exe
Thread Name:
Win32 ThreadId:9244
Extended Properties:
----------------------------------------
Hello Soe,
Thank you for using the Sitefinity forums.
For the brand new project:
I guess you get this error because you have clicked "Rebuild" on your "SitefinityWebApp" project.
The "SitefinityWebApp" project refers DLLs shipped inside the bin folder. So when you click "Clean" or "Rebuild" the bin folder is deleted and the following build process cannot find the needed DLLs in order to recreate them. As a result you get the "Cannot load file or assembly" exception. This is often occurring issue and the easiest way to restore the bin is to keep backup or to copy it from the "_EmptyProject" folder inside the project manager installation directory.
For the existing project:
Can you explain what do you mean by "doesn't start up"? Do you get any exceptions or server errors?
Visual Studio and Sitefinity Project Manager are using the same ASP.NET Development Server called "Cassini". It is situated in the "System.Web.Hosting
" namespace since .NET Framework 1.1.
Did the icon of the ASP.Net Development Server appear in the notification area of the task bar?
Ensure that the target framework of the project is .NET 4.0 because the namespace doesn't appear in the Client Profile version of the framework.
In the project properties, in the tab "Web" select "Use Visual Studio Development Server" and choose "ASP.NET" as a debugger.
Did you tried to run a completely different application with Visual Studio Development Server? If the problem appears to be in the development server try to reinstall the .NET Framework.
Also check the file "%SystemRoot%\system32\drivers\etc\hosts
" it maps the host names to IP addresses. It should contains the not commented line "127.0.0.1 localhost".
You can try to run the web site from IIS with a specified port.
1) Go to IIS
2) expand the connections tree view
3) right click on "Sites"
4) click "Add web site.."
5) Enter site name, select "DefaultAppPool", enter the physical path of your project and specify a port.
There is a second option to add your project to IIS.
1) Go to IIS
2) expand the connections tree view
3) right click on "Sites"
4) click "Add web site.."
5) Enter site name, select "DefaultAppPool", enter the physical path of your project
6) don't change the default port "80"
7) enter host name e.g. "my-sitefinity.com"
8) open the hosts file "%SystemRoot%\system32\drivers\etc\hosts
"
9) add the line "127.0.0.1 my-sitefinity.com" this will associate the selected host name with the localhost IP.
Once you have your project running on IIS you can open it in a browser and debug it in VS. Click Debug -> Attach to process -> Check the two check boxes and select "w3wp.exe" -> click "Attach".
About the custom ASP.NET membership provider:
http://www.sitefinity.com/blogs/slavoingilizov/posts/slavo-ingilizovs-blog/2011/04/20/using_the_asp_net_sql_membership_provider_in_sitefinity
Did you followed all steps mentioned in this article when you created your custom provider? Can you provide us with more information how and when the errors in the log are affecting the web site's workflow?
I am looking forward to your replay.
Greetings,
Georgi Mateev
the Telerik team
Georgi,
thank you for your reply. I have finally figured out why it was not even showing the IIS error page or the ASP.NET yellow page of doom (i.e., ASP.NET compile error page).
My localhost Sitefinity website ( www.my-sitefinity.com ) is configured to use HTTPS as default.
So I had to add HTTPS binding in the inetmgr for my-sitefinity.com website.
Since it is configured as my-sitefinity.com website (i.e., not http://localhost), I had to temporarily stop the Default Web Site in IIS to be able to bind the port 443 to my-sitefinity.com and run it.
Once it starts up, I was able to see the ASP.NET yellow page of death error and was able to troubleshoot it.
So I guess I would add a step in your instructions to bind HTTP port 443 (just in case) for other users having the same issue as me so they can troubleshoot their projects.
There is a second option to add your project to IIS.
1) Go to IIS
2) expand the connections tree view
3) right click on "Sites"
4) click "Add web site.."
5) Enter site name, select "DefaultAppPool", enter the physical path of your project
6) don't change the default port "80"
6a) OPTIONAL: add HTTPS binding for port 443 if your Sitefinity is configured to use HTTPS. You will need to stop the "Default Web Site" in IIS to be able to bind it to port 443.
7) enter host name e.g. "my-sitefinity.com"
8) open the hosts file "%SystemRoot%\system32\drivers\etc\hosts"
9) add the line "127.0.0.1 my-sitefinity.com" this will associate the selected host name with the localhost IP.
Thanks and have a great day :-)
Soe
Georgi,
I don't see any error pages in my project, but Sitefinity ~\App_Data\Sitefinity\Logs\Error.log file still is logging these errors. How can I make these error logs go away?
----------------------------------------
Timestamp: 10/31/2012 4:14:18 PM
Message: HandlingInstanceID: 3c7a5ab1-b147-4b12-89c0-ce7df8f8a009
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
10/31/2012 12:14:18
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Invalid type specified Telerik.Sitefinity.Security.Data.RoleDataProvider
Source : Telerik.Sitefinity
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : TProviderBase InstantiateProvider(Telerik.Sitefinity.Configuration.IDataProviderSettings, System.Type, Telerik.Sitefinity.Abstractions.ExceptionPolicyName, Telerik.Sitefinity.Data.ManagerBase`1[TProviderBase])
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
Additional Info:
MachineName : MyMachineName
TimeStamp : 10/31/2012 4:14:18 PM
FullName : Telerik.Sitefinity.Utilities, Version=5.2.3700.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/3/ROOT-7-129961736421561992
ThreadIdentity :
WindowsIdentity : IIS APPPOOL\MySitefinity
Requested URL : https://my-sitefinity.com/
Category: ErrorLog
Priority: 0
EventId: 9010
Severity: Warning
Title:Enterprise Library Exception Handling
Machine: MyMachineName
App Domain: /LM/W3SVC/3/ROOT-7-129961736421561992
ProcessId: 5724
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:3644
Extended Properties:
----------------------------------------
----------------------------------------
Timestamp: 10/31/2012 4:14:19 PM
Message: HandlingInstanceID: ac0bae6b-1643-4378-8377-c1d2d747a2ae
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
10/31/2012 12:14:19
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Invalid type specified Telerik.Sitefinity.Security.Data.MembershipDataProvider
Source : Telerik.Sitefinity
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : TProviderBase InstantiateProvider(Telerik.Sitefinity.Configuration.IDataProviderSettings, System.Type, Telerik.Sitefinity.Abstractions.ExceptionPolicyName, Telerik.Sitefinity.Data.ManagerBase`1[TProviderBase])
HResult : -2147024809
Stack Trace : at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager)
Additional Info:
MachineName : MyMachineName
TimeStamp : 10/31/2012 4:14:19 PM
FullName : Telerik.Sitefinity.Utilities, Version=5.2.3700.0, Culture=neutral, PublicKeyToken=b28c218413bdf563
AppDomainName : /LM/W3SVC/3/ROOT-7-129961736421561992
ThreadIdentity :
WindowsIdentity : IIS APPPOOL\MySitefinity
Requested URL : https://my-sitefinity.com/
Category: ErrorLog
Priority: 0
EventId: 9010
Severity: Warning
Title:Enterprise Library Exception Handling
Machine: MyMachineName
App Domain: /LM/W3SVC/3/ROOT-7-129961736421561992
ProcessId: 5724
Process Name: c:\windows\system32\inetsrv\w3wp.exe
Thread Name:
Win32 ThreadId:3644
Extended Properties:
----------------------------------------
001.
<?
xml
version
=
"1.0"
?>
002.
<
configuration
>
003.
<
configSections
>
004.
<
sectionGroup
name
=
"madam"
>
005.
<
section
requirePermission
=
"false"
name
=
"formsAuthenticationDisposition"
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.FormsAuthenticationDispositionSectionHandler, Telerik.Sitefinity.Utilities"
/>
006.
<
section
requirePermission
=
"false"
name
=
"basicAuthentication"
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.FormsAuthenticationDispositionSectionHandler, Telerik.Sitefinity.Utilities"
/>
007.
<
section
requirePermission
=
"false"
name
=
"userSecurityAuthority"
type
=
"System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
008.
</
sectionGroup
>
009.
</
configSections
>
010.
011.
<
appSettings
configSource
=
"config\stage\appSettings.config"
/>
012.
<
connectionStrings
configSource
=
"config\stage\connectionStrings.config"
/>
013.
<
system.web
>
014.
<
httpRuntime
maxRequestLength
=
"1048576"
executionTimeout
=
"1800"
/>
015.
<
siteMap
defaultProvider
=
"SitefinitySiteMap"
>
016.
<
providers
>
017.
<
add
name
=
"SitefinitySiteMap"
type
=
"Telerik.Sitefinity.Web.SitefinitySiteMap, Telerik.Sitefinity"
taxonomyProvider
=
"OpenAccessDataProvider"
pageTaxonomy
=
"Pages"
rootNode
=
"FrontendSiteMap"
pageProvider
=
"OpenAccessDataProvider"
/>
018.
</
providers
>
019.
</
siteMap
>
020.
<
roleManager
enabled
=
"true"
defaultProvider
=
"MyRoleProvider"
>
021.
<
providers
>
022.
<
clear
/>
023.
<
add
name
=
"MyRoleProvider"
type
=
"MyNamespace.MyRoleProvider, MySecurityProvider"
connectionStringName
=
"MySecurityConnectionString"
/>
024.
</
providers
>
025.
</
roleManager
>
026.
<
membership
defaultProvider
=
"MyMemberShipProvider"
>
027.
<
providers
>
028.
<
clear
/>
029.
<
add
name
=
"MyMemberShipProvider"
type
=
"MyNamespace.MyMembershipProvider, MySecurityProvider"
connectionStringName
=
"MySecurityConnectionString"
/>
030.
</
providers
>
031.
</
membership
>
032.
<
globalization
uiCulture
=
"auto"
culture
=
"auto"
resourceProviderFactoryType
=
"Telerik.Sitefinity.Localization.ExtendedResourceProviderFactory, Telerik.Sitefinity"
/>
033.
034.
<
compilation
debug
=
"true"
defaultLanguage
=
"C#"
targetFramework
=
"4.0"
numRecompilesBeforeAppRestart
=
"50"
>
035.
<
assemblies
>
036.
<
add
assembly
=
"ABCUpload5, Version=5.3.0.0, Culture=neutral, PublicKeyToken=1f89539196ce5fbf"
/>
037.
<
add
assembly
=
"System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
038.
<
add
assembly
=
"System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
039.
<
add
assembly
=
"PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
040.
<
add
assembly
=
"WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
/>
041.
</
assemblies
>
042.
<
buildProviders
>
043.
<
remove
extension
=
".svc"
/>
044.
<
add
extension
=
".svc"
type
=
"System.ServiceModel.Activation.ServiceBuildProvider, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
045.
</
buildProviders
>
046.
</
compilation
>
047.
048.
<
authentication
mode
=
"Forms"
/>
049.
<
customErrors
mode
=
"Off"
/>
050.
051.
<
pages
controlRenderingCompatibilityVersion
=
"3.5"
clientIDMode
=
"AutoID"
>
052.
<
controls
>
053.
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI"
assembly
=
"System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
054.
<
add
tagPrefix
=
"asp"
namespace
=
"System.Web.UI.WebControls"
assembly
=
"System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
055.
<
add
tagPrefix
=
"telerik"
namespace
=
"Telerik.Web.UI"
assembly
=
"Telerik.Web.UI"
/>
056.
<
add
tagPrefix
=
"sitefinity"
namespace
=
"Telerik.Sitefinity.Web.UI.Fields"
assembly
=
"Telerik.Sitefinity"
/>
057.
</
controls
>
058.
</
pages
>
059.
<
httpHandlers
>
060.
<
remove
verb
=
"*"
path
=
"*.asmx"
/>
061.
<
add
verb
=
"*"
validate
=
"false"
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"
/>
062.
<
add
verb
=
"*"
path
=
"Telerik.RadUploadProgressHandler.ashx"
type
=
"Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"
/>
063.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.FilesDownloadHandler.ashx"
type
=
"Telerik.Sitefinity.Modules.Files.FilesDownloadHandler, Telerik.Sitefinity"
/>
064.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.LibrariesRadUploadHandler.ashx"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.LibrariesRadUploadHandler, Telerik.Sitefinity"
/>
065.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.ThumbnailUploadHandler.ashx"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.ThumbnailUploadHandler, Telerik.Sitefinity"
/>
066.
<
add
verb
=
"*"
path
=
"*.asmx"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
067.
<
add
verb
=
"*"
path
=
"*_AppService.axd"
validate
=
"false"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
068.
<
add
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
validate
=
"false"
/>
069.
<
add
verb
=
"*"
validate
=
"false"
path
=
"Telerik.Web.UI.DialogHandler.axd"
type
=
"Telerik.Web.UI.DialogHandler, Telerik.Web.UI"
/>
070.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.AsyncImageUploadHandler.ashx"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.AsyncImageUploadHandler, Telerik.Sitefinity"
/>
071.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.AsyncFileUploadHandler.ashx"
type
=
"Telerik.Sitefinity.Workflow.AsyncFileUploadHandler, Telerik.Sitefinity"
/>
072.
<
add
verb
=
"*"
path
=
"Telerik.Sitefinity.AsyncToolsetXmlUploadHandler.ashx"
type
=
"Telerik.Sitefinity.Configuration.Web.Services.AsyncToolsetXmlUploadHandler, Telerik.Sitefinity"
/>
073.
<
add
verb
=
"*"
path
=
"Telerik.Web.UI.WebResource.axd"
type
=
"Telerik.Web.UI.WebResource"
validate
=
"false"
/>
074.
<
add
path
=
"Telerik.Web.UI.DialogHandler.aspx"
verb
=
"*"
type
=
"Telerik.Web.UI.DialogHandler"
validate
=
"false"
/>
075.
<
add
verb
=
"*"
path
=
"Telerik.ReportViewer.axd"
type
=
"Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms"
/>
076.
</
httpHandlers
>
077.
<
httpModules
>
078.
<
add
name
=
"ScriptModule"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
079.
<
add
name
=
"Sitefinity"
type
=
"Telerik.Sitefinity.Web.SitefinityHttpModuleIIS6, Telerik.Sitefinity"
/>
080.
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"
/>
081.
<
add
name
=
"SitefinityAnalyticsModule"
type
=
"Telerik.Sitefinity.Analytics.Server.DependencyResolution.Module.DependencyRegistrarHttpModule, Telerik.Sitefinity.Analytics.Server.DependencyResolution"
/>
082.
<
add
name
=
"SitefinityAtompubModule"
type
=
"Telerik.Sitefinity.Security.SitefinityAtompubModule, Telerik.Sitefinity"
/>
083.
</
httpModules
>
084.
<
xhtmlConformance
mode
=
"Legacy"
/>
085.
</
system.web
>
086.
<
system.serviceModel
>
087.
<
bindings
>
088.
<
basicHttpBinding
>
089.
<
binding
name
=
"basicHttpBinding"
maxReceivedMessageSize
=
"2147483647"
maxBufferSize
=
"2147483647"
>
090.
<
security
mode
=
"None"
/>
091.
</
binding
>
092.
</
basicHttpBinding
>
093.
</
bindings
>
094.
<
behaviors
>
095.
<
endpointBehaviors
>
096.
<
behavior
name
=
"SitefinityWebApp.Sitefinity.Services.Content.EventsAspNetAjaxBehavior"
>
097.
<
enableWebScript
/>
098.
</
behavior
>
099.
</
endpointBehaviors
>
100.
<
serviceBehaviors
>
101.
<
behavior
>
102.
<
serviceMetadata
httpGetEnabled
=
"true"
/>
103.
<
serviceDebug
includeExceptionDetailInFaults
=
"true"
/>
104.
</
behavior
>
105.
<
behavior
name
=
"Telerik.Sitefinity.Analytics.Infrastructure.Services.AnalyticsPermissionsServiceBehavior"
>
106.
<
serviceMetadata
httpGetEnabled
=
"true"
/>
107.
<
serviceDebug
includeExceptionDetailInFaults
=
"false"
/>
108.
</
behavior
>
109.
<
behavior
name
=
"Telerik.Sitefinity.Analytics.Server.GoogleAnalyticsPlugin.Services.AccountsServiceBehavior"
>
110.
<
serviceMetadata
httpGetEnabled
=
"true"
/>
111.
<
serviceDebug
includeExceptionDetailInFaults
=
"false"
/>
112.
</
behavior
>
113.
<
behavior
name
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.DashboardDataBehavior"
>
114.
<
serviceMetadata
httpGetEnabled
=
"true"
/>
115.
<
serviceDebug
includeExceptionDetailInFaults
=
"false"
/>
116.
</
behavior
>
117.
<
behavior
name
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.MapDataServiceBehavior"
>
118.
<
serviceMetadata
httpGetEnabled
=
"true"
/>
119.
<
serviceDebug
includeExceptionDetailInFaults
=
"false"
/>
120.
</
behavior
>
121.
<
behavior
name
=
"Telerik.Sitefinity.Web.Services.LocalizationBehavior"
/>
122.
</
serviceBehaviors
>
123.
</
behaviors
>
124.
<
services
>
125.
<
service
name
=
"SitefinityWebApp.Sitefinity.Services.Content.Events"
>
126.
<
endpoint
address
=
""
behaviorConfiguration
=
"SitefinityWebApp.Sitefinity.Services.Content.EventsAspNetAjaxBehavior"
binding
=
"webHttpBinding"
contract
=
"SitefinityWebApp.Sitefinity.Services.Content.Events"
/>
127.
</
service
>
128.
<
service
behaviorConfiguration
=
"Telerik.Sitefinity.Analytics.Infrastructure.Services.AnalyticsPermissionsServiceBehavior"
name
=
"Telerik.Sitefinity.Analytics.Infrastructure.Services.AnalyticsPermissionsService"
>
129.
<
endpoint
address
=
""
binding
=
"basicHttpBinding"
bindingConfiguration
=
"basicHttpBinding"
contract
=
"Telerik.Sitefinity.Analytics.Infrastructure.Services.AnalyticsPermissionsService"
/>
130.
<!-- note: To enable https/SSL support for the Analytics module, uncomment this endpoint -->
131.
<!--<
endpoint
address
=
""
132.
binding
=
"basicHttpBinding"
133.
bindingConfiguration
=
"webBinding"
134.
contract
=
"Telerik.Sitefinity.Analytics.Infrastructure.Services.AnalyticsPermissionsService"
/>-->
135.
</
service
>
136.
<
service
behaviorConfiguration
=
"Telerik.Sitefinity.Analytics.Server.GoogleAnalyticsPlugin.Services.AccountsServiceBehavior"
name
=
"Telerik.Sitefinity.Analytics.Server.GoogleAnalyticsPlugin.Services.AccountsService"
>
137.
<
endpoint
address
=
""
binding
=
"basicHttpBinding"
bindingConfiguration
=
"basicHttpBinding"
contract
=
"Telerik.Sitefinity.Analytics.Server.GoogleAnalyticsPlugin.Services.AccountsService"
/>
138.
<!-- note: To enable https/SSL support for the Analytics module, uncomment this endpoint -->
139.
<!--<
endpoint
address
=
""
140.
binding
=
"basicHttpBinding"
141.
bindingConfiguration
=
"webBinding"
142.
contract
=
"Telerik.Sitefinity.Analytics.Server.GoogleAnalyticsPlugin.Services.AccountsService"
/>-->
143.
</
service
>
144.
<
service
behaviorConfiguration
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.DashboardDataBehavior"
name
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.DashboardData"
>
145.
<
endpoint
address
=
""
binding
=
"basicHttpBinding"
bindingConfiguration
=
"basicHttpBinding"
contract
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.DashboardData"
/>
146.
<!-- note: To enable https/SSL support for the Analytics module, uncomment this endpoint -->
147.
<!--<
endpoint
address
=
""
148.
binding
=
"basicHttpBinding"
149.
bindingConfiguration
=
"webBinding"
150.
contract
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.DashboardData"
/>-->
151.
</
service
>
152.
<
service
behaviorConfiguration
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.MapDataServiceBehavior"
name
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.MapDataService"
>
153.
<
endpoint
address
=
""
binding
=
"basicHttpBinding"
bindingConfiguration
=
"basicHttpBinding"
contract
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.MapDataService"
/>
154.
<!-- note: To enable https/SSL support for the Analytics module, uncomment this endpoint -->
155.
<!--<
endpoint
address
=
""
156.
binding
=
"basicHttpBinding"
157.
bindingConfiguration
=
"webBinding"
158.
contract
=
"Telerik.Sitefinity.Analytics.Server.Infrastructure.Services.MapDataService"
/>-->
159.
</
service
>
160.
</
services
>
161.
<
serviceHostingEnvironment
aspNetCompatibilityEnabled
=
"true"
multipleSiteBindingsEnabled
=
"true"
/>
162.
</
system.serviceModel
>
163.
<!--
164.
The system.webServer section is required for running ASP.NET AJAX under Internet
165.
Information Services 7.0. It is not necessary for previous version of IIS.
166.
-->
167.
<
system.webServer
>
168.
<
validation
validateIntegratedModeConfiguration
=
"false"
/>
169.
<
modules
runAllManagedModulesForAllRequests
=
"true"
>
170.
<
remove
name
=
"WebDAVModule"
/>
171.
<
remove
name
=
"UrlRoutingModule"
/>
172.
<
remove
name
=
"ScriptModule"
/>
173.
<
remove
name
=
"RadUploadModule"
/>
174.
<
remove
name
=
"Sitefinity"
/>
175.
<
remove
name
=
"SitefinityAnalyticsModule"
/>
176.
<
remove
name
=
"SitefinityAtompubModule"
/>
177.
<
add
name
=
"ScriptModule"
preCondition
=
"managedHandler"
type
=
"System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
178.
<
add
name
=
"Sitefinity"
type
=
"Telerik.Sitefinity.Web.SitefinityHttpModule, Telerik.Sitefinity"
/>
179.
<
add
name
=
"RadUploadModule"
type
=
"Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"
/>
180.
<
add
name
=
"SitefinityAnalyticsModule"
type
=
"Telerik.Sitefinity.Analytics.Server.DependencyResolution.Module.DependencyRegistrarHttpModule, Telerik.Sitefinity.Analytics.Server.DependencyResolution"
/>
181.
<
add
name
=
"SitefinityAtompubModule"
type
=
"Telerik.Sitefinity.Security.SitefinityAtompubModule, Telerik.Sitefinity"
/>
182.
</
modules
>
183.
<
handlers
>
184.
<
remove
name
=
"WebDAV"
/>
185.
<
remove
name
=
"ScriptHandlerFactory"
/>
186.
<
remove
name
=
"ScriptHandlerFactoryAppServices"
/>
187.
<
remove
name
=
"ScriptResource"
/>
188.
<
remove
name
=
"UrlRoutingHandler"
/>
189.
<
remove
name
=
"WildCard"
/>
190.
<
remove
name
=
"WildCard32"
/>
191.
<
remove
name
=
"Telerik.Web.UI.DialogHandler"
/>
192.
<
remove
name
=
"Telerik.RadUploadProgressHandler"
/>
193.
<
remove
name
=
"Telerik.Sitefinity.FilesDownloadHandler"
/>
194.
<
remove
name
=
"Telerik.Sitefinity.LibrariesRadUploadHandler"
/>
195.
<
remove
name
=
"Telerik.Sitefinity.AsyncImageUploadHandler"
/>
196.
<
remove
name
=
"Telerik.Sitefinity.AsyncFileUploadHandler"
/>
197.
<
remove
name
=
"Telerik.Sitefinity.AsyncToolsetXmlUploadHandler"
/>
198.
<
remove
name
=
"Telerik.Web.UI.SpellCheckHandler"
/>
199.
<
remove
name
=
"Telerik_Web_UI_WebResource_axd"
/>
200.
<
remove
name
=
"Telerik_Web_UI_DialogHandler_aspx"
/>
201.
<
add
name
=
"ScriptHandlerFactory"
verb
=
"*"
path
=
"*.asmx"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
202.
<
add
name
=
"ScriptHandlerFactoryAppServices"
verb
=
"*"
path
=
"*_AppService.axd"
preCondition
=
"integratedMode"
type
=
"System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
203.
<
add
name
=
"ScriptResource"
preCondition
=
"integratedMode"
verb
=
"GET,HEAD"
path
=
"ScriptResource.axd"
type
=
"System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
/>
204.
<
add
name
=
"WildCard"
path
=
"*"
verb
=
"*"
modules
=
"IsapiModule"
scriptProcessor
=
"%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"
resourceType
=
"Unspecified"
requireAccess
=
"None"
preCondition
=
"classicMode,runtimeVersionv4.0,bitness64"
/>
205.
<
add
name
=
"WildCard32"
path
=
"*"
verb
=
"*"
modules
=
"IsapiModule"
scriptProcessor
=
"%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll"
resourceType
=
"Unspecified"
requireAccess
=
"None"
preCondition
=
"classicMode,runtimeVersionv4.0,bitness32"
/>
206.
<
add
name
=
"Telerik.Web.UI.DialogHandler"
path
=
"Telerik.Web.UI.DialogHandler.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.DialogHandler, Telerik.Web.UI"
/>
207.
<
add
name
=
"Telerik.RadUploadProgressHandler"
path
=
"Telerik.RadUploadProgressHandler.ashx"
verb
=
"*"
type
=
"Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"
/>
208.
<
add
name
=
"Telerik.Sitefinity.FilesDownloadHandler"
path
=
"Telerik.Sitefinity.FilesDownloadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Modules.Files.FilesDownloadHandler, Telerik.Sitefinity"
/>
209.
<
add
name
=
"Telerik.Sitefinity.LibrariesRadUploadHandler"
path
=
"Telerik.Sitefinity.LibrariesRadUploadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.LibrariesRadUploadHandler, Telerik.Sitefinity"
/>
210.
<
add
name
=
"Telerik.Sitefinity.ThumbnailUploadHandler"
path
=
"Telerik.Sitefinity.ThumbnailUploadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.ThumbnailUploadHandler, Telerik.Sitefinity"
/>
211.
<
add
name
=
"Telerik.Sitefinity.AsyncImageUploadHandler"
path
=
"Telerik.Sitefinity.AsyncImageUploadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Modules.Libraries.Web.AsyncImageUploadHandler, Telerik.Sitefinity"
/>
212.
<
add
name
=
"Telerik.Sitefinity.AsyncFileUploadHandler"
path
=
"Telerik.Sitefinity.AsyncFileUploadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Workflow.AsyncFileUploadHandler, Telerik.Sitefinity"
/>
213.
<
add
name
=
"Telerik.Sitefinity.AsyncToolsetXmlUploadHandler"
path
=
"Telerik.Sitefinity.AsyncToolsetXmlUploadHandler.ashx"
verb
=
"*"
type
=
"Telerik.Sitefinity.Configuration.Web.Services.AsyncToolsetXmlUploadHandler, Telerik.Sitefinity"
/>
214.
<
add
name
=
"Telerik.Web.UI.SpellCheckHandler"
verb
=
"*"
path
=
"Telerik.Web.UI.SpellCheckHandler.axd"
type
=
"Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"
/>
215.
<
add
name
=
"Telerik_Web_UI_WebResource_axd"
verb
=
"*"
path
=
"Telerik.Web.UI.WebResource.axd"
preCondition
=
"integratedMode"
type
=
"Telerik.Web.UI.WebResource"
/>
216.
<
add
name
=
"Telerik_Web_UI_DialogHandler_aspx"
verb
=
"*"
preCondition
=
"integratedMode"
path
=
"Telerik.Web.UI.DialogHandler.aspx"
type
=
"Telerik.Web.UI.DialogHandler"
/>
217.
<
add
name
=
"Telerik.ReportViewer.axd_*"
verb
=
"*"
preCondition
=
"integratedMode"
path
=
"Telerik.ReportViewer.axd"
type
=
"Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms"
/>
218.
</
handlers
>
219.
<
staticContent
>
220.
<
clientCache
cacheControlMode
=
"UseMaxAge"
cacheControlMaxAge
=
"31.00:00:00"
/>
221.
</
staticContent
>
222.
<
urlCompression
doDynamicCompression
=
"true"
doStaticCompression
=
"true"
dynamicCompressionBeforeCache
=
"true"
/>
223.
<
httpProtocol
>
224.
<
customHeaders
>
225.
<!--<
remove
name
=
"Cache-Control"
/>
226.
<
remove
name
=
"Pragma"
/>
227.
<
remove
name
=
"Expires"
/>-->
228.
<
clear
/>
229.
<
add
name
=
"Cache-Control"
value
=
"public"
/>
230.
<
add
name
=
"Pragma"
value
=
"public"
/>
231.
<
add
name
=
"Expires"
value
=
"01/01/2022"
/>
232.
</
customHeaders
>
233.
</
httpProtocol
>
234.
</
system.webServer
>
235.
236.
<
madam
>
237.
<
userSecurityAuthority
realm
=
"Sitefinity"
provider
=
"Telerik.Sitefinity.Utilities.MS.Madam.FormsUserSecurityAuthority"
exposeClearTextPassword
=
"false "
/>
238.
<
formsAuthenticationDisposition
>
239.
<
discriminators
all
=
"1"
>
240.
<!-- This discriminator helps detect redirection to the Forms login page. -->
241.
<
discriminator
inputExpression
=
"Response.RedirectLocation"
pattern
=
"login\?returnurl\="
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator"
/>
242.
<
discriminator
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.Discriminator"
all
=
"false"
>
243.
<
discriminator
inputExpression
=
"Request.Url"
pattern
=
"atompub/.*"
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator"
/>
244.
</
discriminator
>
245.
</
discriminators
>
246.
</
formsAuthenticationDisposition
>
247.
<
basicAuthentication
>
248.
<
discriminators
all
=
"1"
>
249.
<
discriminator
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.Discriminator"
all
=
"false"
>
250.
<
discriminator
inputExpression
=
"Request.Url"
pattern
=
"atompub/.*"
type
=
"Telerik.Sitefinity.Utilities.MS.Madam.RegexDiscriminator"
/>
251.
</
discriminator
>
252.
</
discriminators
>
253.
</
basicAuthentication
>
254.
</
madam
>
255.
</
configuration
>
01.
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
02.
<!-- authenticationMode="Forms" -->
03.
<
securityConfig
xmlns:config
=
"urn:telerik:sitefinity:configuration"
xmlns:type
=
"urn:telerik:sitefinity:configuration:type"
config:version
=
"5.2.3700.0"
04.
authenticationMode
=
"Forms"
05.
authCookieName
=
".SFAUTH"
06.
authCookieTimeout
=
"30"
07.
rolesCookieName
=
".SFROLES"
08.
validationKey
=
"[REMOVED]"
09.
decryptionKey
=
"[REMOVED]"
10.
loggingCookieName
=
".SFLOG-/"
11.
backendUsersSessionTimeout
=
"30"
12.
filterQueriesByViewPermissions
=
"True"
>
13.
14.
<!-- removed the rest of the config entries for clarity -->
15.
16.
<
roleProviders
>
17.
<
add
description
=
"MyRoleProvider"
18.
type
=
"MyNamespace.MyRoleProvider, MySecurityProvider"
19.
connectionStringName
=
"MySecurityConnectionString"
20.
enabled
=
"True"
21.
name
=
"MyRoleProvider"
22.
title
=
"My Role Provider"
/>
23.
</
roleProviders
>
24.
25.
26.
<
membershipProviders
>
27.
<
add
description
=
"MyMembershipProvider"
28.
type
=
"MyNamespace.MyMembershipProvider, MySecurityProvider"
29.
connectionStringName
=
"MySecurityonnectionString"
30.
enabled
=
"True"
31.
name
=
"MyMembershipProvider"
32.
title
=
"My Membership Provider"
/>
33.
34.
35.
<
config:link
name
=
"OpenAccessMembership37Provider"
36.
path
=
"migrationModuleConfig/membershipProviders/OpenAccessMembership37Provider"
37.
module
=
"Migration"
/>
38.
</
membershipProviders
>
39.
40.
41.
<
administrativeRoles
>
42.
<
role
roleProvider
=
"MyRoleProvider"
roleName
=
"CMS_ADMIN"
/>
43.
</
administrativeRoles
>
44.
</
securityConfig
>
Hello,
Would it be possible to do a quick test: disable the SQL provider you have try the default provider to see if it still logs the error. Also, if you could try it with claims.
Greetings,Hi Atanas,
Thank you for your reply. I have changed it to Claims-based authentication to see how it works.
Below are the sections of Web.config and SecurityConfig.config for the Claims-based auth.
<
roleManager
defaultProvider
=
"Default"
>
<
providers
>
<
clear
/>
<
add
name
=
"Default"
type
=
"Telerik.Sitefinity.Security.Data.SitefinityRoleProvider, Telerik.Sitefinity"
/>
</
providers
>
</
roleManager
>
<
membership
defaultProvider
=
"Default"
>
<
providers
>
<
clear
/>
<
add
name
=
"Default"
type
=
"Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity"
/>
</
providers
>
</
membership
>
My SecurityConfig.config
<
roleProviders
>
<
add
description
=
"MyRoleProvider"
type
=
"MyNamespace.MyRoleProvider, MySecurityProvider"
connectionStringName
=
"MySecurityConnectionString"
enabled
=
"True"
name
=
"MyRoleProvider"
title
=
"My Role Provider"
/>
</
roleProviders
>
<
membershipProviders
>
<
add
description
=
"MyMembershipProvider"
type
=
"MyNamespace.MyMembershipProvider, MySecurityProvider"
connectionStringName
=
"MySecurityConnectionString"
enabled
=
"True"
name
=
"MyMembershipProvider"
title
=
"My Membership Provider"
/>
<
config:link
name
=
"OpenAccessMembership37Provider"
path
=
"migrationModuleConfig/membershipProviders/OpenAccessMembership37Provider"
module
=
"Migration"
/>
</
membershipProviders
>
Telerik.Sitefinity.Security.Model.User sitefinityUser;
UserLoggingReason reason = SecurityManager.AuthenticateUser(
"MyMembershipProvider"
, strUsername, strPassword,
false
,
out
sitefinityUser);
"SitefinityMembershipProvider is just a wrapper around MembershipDataProvider that provides a bridge to the standard ASP.Net Membership API."
tokenRequest.Headers.Add(
"sf_domain"
,
"CustomProviderName"
);
'Telerik.Sitefinity.Security.Claims.SitefinityClaimsAuthenticationModule.Current' is obsolete: '"There is no need to use this property, it will be removed in one of the next releases"'
Hi,
You can utilize a Custom Membership provider, which will take the users from the database and create Sitefinity users based on the credentials from that database. Authentication against an external database can be done with an ASP.NET MembershipProvider. Here is some more information that will be useful and a sample:
In a nutshell what's important to know is that Sitefinity will work with a slightly different concept of a User, compared tot he ASP.NET concept of user. Keeping this in mind, you can either develop your custom providers based on the default ASP.NET MembersipProvider and then register it as any regular ASP.NET membership provider in the web.config - Sitefintiy will take care of the rest using our built-in MembershiProviderWrapper for ASP.NET-based membership providers.
If you are interested in an example of an ASP.NET MembershipProvider usage you can also check this blog post.
On the other side, if you need entirely different logic you can develop a custom provider based on our MembershipDataProvider, and ensure you are passing a user of type Telerik.Sitefinity.Security.Model.User - either with a custom wrapper or in the provider implementation.
1. Retrieving the user - this is the part which is entirely up to you, that's the whole purpose of having a provider-based architecture , since we give you the freedom of implementing any possible way of getting your user data
2. Returning the user to Sitefinity - since Sitefinity works with our own concept of user you have to make sure that you are returning the correct User type so Sitefinity can operate with it.
For the most part this logic is contained in the GetUsers() method, which is responsible for returning all of your users as Sitefinity users.
Then you can implement further overloads of the GetUser() method, taking different parameters according to the specific use case scenario at hand -any of these overloads should return a single Sitefinity user, which will be the object our CMS will later work with.
In order to complete the authentication, besides a User object, you'll need also a ValidateUser method - this method should contain your own logic for checking the provided login credentials with your users source, and needs to return a boolean indication to Sitefintiy whether the provided credentials match or not.
These are the basics for logging in a user successfully in Sitefinity, of course if you need to have a full blown CRUD solution, you'll need to implement the Create and Delete methods, as well as Update user method.
We often get asked why there is no official sample on creating custom membership providers with Sitefinity, but if you analyze the above statement you'll realize that since each use case scenario differs (table names, data persisted in the database, specific requirements) it would be very hard to come up with a universal sample to suit all these factors.
I'm attaching a sample of a custom membership provider which uses LINQ 2 SQL O/R to retrieve users from a custom database and returns them as Sitefinity user.
Please inspect the provider logic and architecture, and try implementing the GetUsers() method in such a way that it would return all users from your service.
Then Implement the necessary overloads of GetUser() to return a single Sitefinity User out of the GetUsers() returned collection.
Last but not least implement the ValidateUser() method wehre you'll be checking with your service whether such a user with the provided username, ID, and password (or whatever other criteria you want to pass) exists in your users source. You need to return a boolean value accordingly. Since you mentioned you need to authenticate the user in another application as well, I believe the VliadateUser() method would be the most appropriate place to plug this logic as well.
We have introduced improvements to the Authentication implementation in 5.2 and it can be done with one line:
SecurityManager.AuthenticateUser(
"MembershipProvider"
, strUsername, strPassword,
false
,
out
sitefinityUser);
With the latest changes to this logic everything works as it should and users authenticated through code are not experiencing any issues.
This will authenticate the user and will issue the needed cookies.
Regarding the SSO, it is a matter of configuration if you have implement a provider that works:Setting up SSO with Windows authentication and Setting up SSO with claims-based authentication
I am attaching a sample of a CustomMembershipProvider.