DiscountASP.NET Forums                  

Go Back   DiscountASP.NET Forums > Site Programming, Development and Design > ASP.NET > Silverlight

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 03-22-2011, 12:43 PM   #1
frankpatton
 
Join Date: Nov 2009
Posts: 10
Silverlight 4 Business Application with authentication

Is there anyone out there who is a Silverlight 4 Business Application with authentication hooked in to an DASP SQL2008 database .. I have it working perfectly on my laptop, and is working perfectly in accessing the DASP SQL2008 database. Where I fail is when I try to authenticate .. is there a simple web config example available ? I am willing to share code if anyone would like to look at it
frankpatton is offline  
Old 03-24-2011, 11:53 AM   #2
frankpatton
 
Join Date: Nov 2009
Posts: 10
This Worked For Me .. Hope It Helps Someone Out There

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.serviceModel">
<section name="domainServices"
type="System.ServiceModel.DomainServices.Hosting.D omainServicesSection,
System.ServiceModel.DomainServices.Hosting,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"
allowDefinition="MachineToApplication"
requirePermission="false" />
</sectionGroup>
</configSections>

<system.web>
<httpModules>
<add name="DomainServiceModule"
type="System.ServiceModel.DomainServices.Hosting.D omainServiceHttpModule,
System.ServiceModel.DomainServices.Hosting,
Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
</httpModules>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms name=".Bently_ASPXAUTH" />
</authentication>
<membership defaultProvider="BTMembershipProvider">
<providers>
<clear />
<add name="BTMembershipProvider"
connectionStringName="BentlyDatabase"
applicationName="/Bently"
type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="false"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="4"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="BTRoleProvider">
<providers>
<clear />
<add name="BTRoleProvider"
connectionStringName="BentlyDatabase"
applicationName="/Bently"
type="System.Web.Security.SqlRoleProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
<profile defaultProvider="BTProfileProvider">
<providers>
<add name="BTProfileProvider"
connectionStringName="BentlyDatabase"
applicationName="/Bently"
type="System.Web.Profile.SqlProfileProvider,
System.Web,
Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="FriendlyName" />
</properties>
</profile>
</system.web>
<system.webServer>
<security>
<authentication>
<basicAuthentication enabled="false" />
</authentication>
</security>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="DomainServiceModule"
type="System.ServiceModel.DomainServices.Hosting.D omainServiceHttpModule,
System.ServiceModel.DomainServices.Hosting,
Version=4.0.0.0,
Culture=neutral,
PublicKeyToken=31BF3856AD364E35" />
</modules>
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true"
multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<connectionStrings>
<clear/>

<remove name="LocalSqlServer"/>

<add name="SQL2008_621130_buickEntities"
connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;
provider=System.Data.SqlClient;
provider connection string=&quot;
Data Source=Sql2k803.discountasp.net;
Initial Catalog=SQL2008_621130_buick;
Persist Security Info=True;
User ID=SQL2008_621130_buick_user;
Password=ford12345;
MultipleActiveResultSets=True&quot;"
providerName="System.Data.EntityClient" />
<add name="BentlyDatabase"
connectionString="Data Source=tcp:Sql2k803.discountasp.net;
Database=SQL2008_621130_buick;
User ID=SQL2008_621130_buick_user;
Password=ford12345;
Integrated Security=false"
providerName="System.Data.SqlClient" />
<add name="LocalSqlServer"
connectionString="Data Source=tcp:Sql2k803.discountasp.net;
Initial Catalog=SQL2008_621130_buick;
User ID=SQL2008_621130_buick_user;
Password=ford12345"
providerName="System.Data.SqlClient"/>
</connectionStrings>
</configuration>
frankpatton is offline  
Old 03-25-2011, 02:02 PM   #3
bills
 
Join Date: Mar 2011
Posts: 2
frank,
Thank you for sharing I will have to take a look at this...
bills is offline  
Old 10-08-2011, 10:08 AM   #4
cwpcentral
 
Join Date: Oct 2011
Posts: 5
Frank can you tell us about your application architecture? is it using web services? is it using wcf services?

I'm no web security guy... i have just spent hundreds of hours trying to get a small SL4 application deployed to IIS7.5 and you really have to be experienced in IIS and security and applicition configuration.

What is DSAP? I was using windows authentication because my users were in house and this is an intranet application. So i was using a javascript hack to get the windows authenticated user but all of the IIS settings would not always provide access to the user information that way. So a few days ago I moved my windows authentication code to a wcf basic http service. In order or this to work. Still it was hit or miss with the different authentication modes and authorization available. I had my architect who seems to be more knowledgeable then i to help. he took different approach by creating a simple application and seeing what m$ did out of the book. It camed down to changing the configuration files. one for the silverlight application and the web.config file for the asp.net hosting site. One this that stopped me dead in my tracks to begin with was to first create a new SL4 application with an Asp.net web site. so my app was named MyApp and web project was named MyApp.web. The you have to create a silverlight enable web service. So right click on the MyApp.web project and select add item but select the silverlight enabled service option. Also, everyone say the deploy picture is better if you run applicaiton on your development but deploy it to IIS on your dev box before trying to deploy to a hosted site or production server. If you can download fiddler2 and run it as a proxy between your VS2010 and the http message going out over the wire. I could not use this tool because my network people have use locked down tight. I did configure for an logger file to be created and used svr track viewer tool from m$ this helped me solve 3 problems.
cwpcentral is offline  
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Silverlight 4 - Business Application Error pagla ASP.NET WebServices 2 11-08-2010 08:31 AM
Silverlight Business Application Woes system2 Silverlight 5 10-22-2010 06:12 PM
WCF Ria Services - Silverlight Business Application - Errors abioli Silverlight 10 09-01-2010 09:56 PM
Business application frameworks CrystalCMS Application/software questions and recommendations 5 11-09-2009 10:14 AM
Streaming a Silverlight Media Application from Silverlight Live jrahma Silverlight 1 09-08-2007 12:48 PM


All times are GMT -7. The time now is 06:43 PM.


vBulletin ©Jelsoft Enterprises Ltd.