Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Integrate with current sql database
strager
#1 Posted : Wednesday, 2 March 2011 1:15:06 PM(UTC)
Rank: Newbie

Joined: 2/03/2011(UTC)
Posts: 3
Location: South Carolina

I love this gallery... Thank you for sharing.

I have an existing application asp.net 3.5 with an sql server 2005 back end. I use the membership provider model and already have users and roles set.

I wanted to use my existing database to store all gsp data. I noticed there are scripts in the package I downloaded and wanted to know if first, if running the scripts will remove my existing users, I can manually add if necessary. Second, will gps work in my existing database? I did read the admin manual but there wasn't anything regarding merging all tables etc. to an existing database, only membership. Third, what would I need to change in web.config?
Lastly, I don't have access to the IIS server on my hosting site, can I do this without access to IIS?

Thank you,

Sheri

UPDATE

I manually applied the sql script to my database to create all tables. No problems.

Now I need to know what changes I need to make to web.config.

Thanks
Roger Martin
#2 Posted : Wednesday, 2 March 2011 8:35:52 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

All you need to do is update the connection string.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
strager
#3 Posted : Wednesday, 2 March 2011 8:45:11 PM(UTC)
Rank: Newbie

Joined: 2/03/2011(UTC)
Posts: 3
Location: South Carolina

Hi, thanks for the quick reply.

In your web.config 3.5 sql server example the following section is included.
I did change the name of the connection string, but I receive an error that starts like...
"The element 'system.web' has invalid child element 'galleryserverpro'...
I receive it on the following line.
<galleryServerPro>
<core galleryResourcesPath="gs" />
<dataProvider defaultProvider="SqlServerGalleryServerProProvider">
<providers>
<clear />
<add
applicationName="Service2020"
connectionStringName="SalonConnectionString"
name="SqlServerGalleryServerProProvider"
type="GalleryServerPro.Data.SqlServer.SqlDataProvider" />
</providers>
</dataProvider>
</galleryServerPro>

Do I need to change provider information?
Roger Martin
#4 Posted : Wednesday, 2 March 2011 8:48:12 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

That error indicates you are missing the declaration for the <galleryServerPro> section. It should be at the beginning of the file and look like this:

Code:
<sectionGroup name="system.web">
<section name="galleryServerPro" type="GalleryServerPro.Configuration.GalleryServerProConfigSettings, GalleryServerPro.Configuration" allowDefinition="MachineToApplication" requirePermission="false"/>
</sectionGroup>

Roger Martin
Creator and Lead Developer of Gallery Server Pro
strager
#5 Posted : Wednesday, 2 March 2011 9:10:55 PM(UTC)
Rank: Newbie

Joined: 2/03/2011(UTC)
Posts: 3
Location: South Carolina

Thanks again for the quick reply.

I do have the section name declare. I also get the following errors/messages, without even attempting to build. I included my web.config below the errors/messages.

I really appreciate your help.

Sheri


1. The element 'system.web' has invalid child element 'galleryServerPro'. List of possible elements expected: 'anonymousIdentification, authentication, authorization, browserCaps, clientTarget, compilation, customErrors, deployment, deviceFilters, globalization, healthMonitoring, hostingEnvironment, httpCookies, httpHandlers, httpModules, httpRuntime, identity, machineKey, membership, mobileControls, pages, processModel, profile, roleManager, securityPolicy, sessionPageState, sessionState, siteMap, trace, trust, urlMappings, webControls, webParts, webServices, xhtmlConformance, caching

Message 2 Could not find schema information for the element 'cachingConfiguration'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 43 5 Service2020

Message 3 Could not find schema information for the attribute 'defaultCacheManager'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 43 26 Service2020

Message 4 Could not find schema information for the element 'cacheManagers'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 44 8 Service2020

Message 5 Could not find schema information for the element 'add'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 11 Service2020

Message 6 Could not find schema information for the attribute 'expirationPollFrequencyInSeconds'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 15 Service2020

Message 7 Could not find schema information for the attribute 'maximumElementsInCacheBeforeScavenging'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 53 Service2020

Message 8 Could not find schema information for the attribute 'numberToRemoveWhenScavenging'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 99 Service2020

Message 9 Could not find schema information for the attribute 'backingStoreName'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 133 Service2020

Message 10 Could not find schema information for the attribute 'name'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 45 165 Service2020

Message 11 Could not find schema information for the element 'backingStores'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 47 8 Service2020

Message 12 Could not find schema information for the element 'add'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 48 11 Service2020

Message 13 Could not find schema information for the attribute 'encryptionProviderName'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 48 15 Service2020

Message 14 Could not find schema information for the attribute 'type'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 48 41 Service2020

Message 15 Could not find schema information for the attribute 'name'. C:\Users\depot\Documents\Visual Studio 2008\Projects\Service2020wGallery\Service2020wGallery\Web.config 48 186 Service2020

Error 16 Project file must include the .NET Framework assembly 'WindowsBase, PresentationCore, PresentationFramework' in the reference list. Service2020




<configuration>
<configSections>
<sectionGroup name="system.web">
<section name="galleryServerPro" type="GalleryServerPro.Configuration.GalleryServerProConfigSettings, GalleryServerPro.Configuration" allowDefinition="MachineToApplication" requirePermission="false"/>
</sectionGroup>
<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching" requirePermission="false"/>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings />
<connectionStrings>
<clear />

<add name="SalonConnectionString" connectionString="Data Source=xx.xxx.xxx.xxx;Initial Catalog=Salon;User Id=UserName;Password=Password"
providerName="System.Data.SqlClient" />

</connectionStrings>
<appSettings>
<add key="ComponentArtScriptControls" value="PerControl" />
</appSettings>
<cachingConfiguration defaultCacheManager="Cache Manager">
<cacheManagers>
<add expirationPollFrequencyInSeconds="60" maximumElementsInCacheBeforeScavenging="1000" numberToRemoveWhenScavenging="10" backingStoreName="Null Storage" name="Cache Manager" />
</cacheManagers>
<backingStores>
<add encryptionProviderName="" type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" name="Null Storage" />
</backingStores>
</cachingConfiguration>

<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.

Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
</assemblies>
</compilation>
<pages theme="" styleSheetTheme="" validateRequest="false">
<namespaces>
<clear />
<add namespace="System" />
<add namespace="System.Collections" />
<add namespace="System.Collections.Generic" />
<add namespace="System.Collections.Specialized" />
<add namespace="System.Configuration" />
<add namespace="System.Text" />
<add namespace="System.Text.RegularExpressions" />
<add namespace="System.Linq" />
<add namespace="System.Xml.Linq" />
<add namespace="System.Web" />
<add namespace="System.Web.Caching" />
<add namespace="System.Web.SessionState" />
<add namespace="System.Web.Security" />
<add namespace="System.Web.Profile" />
<add namespace="System.Web.UI" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.WebControls.WebParts" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>

<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</controls>
</pages>

<galleryServerPro>
<core galleryResourcesPath="gs" />
<dataProvider defaultProvider="SqlServerGalleryServerProProvider">
<providers>
<clear />
<add
applicationName="Service2020"
connectionStringName="SalonConnectionString"
name="SqlServerGalleryServerProProvider"
type="GalleryServerPro.Data.SqlServer.SqlDataProvider" />
</providers>
</dataProvider>
</galleryServerPro>

<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
<!-- Gets and sets the amount of time, in minutes, allowed between requests before the session-state provider terminates the session.
Default is 20 minute.
-->
<sessionState mode="InProc" cookieless="AutoDetect" timeout="60" />
<authentication mode="Forms">
<forms loginUrl="Login.aspx" cookieless="AutoDetect" timeout="60" />
</authentication>
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="Web.sitemap" securityTrimmingEnabled="true"/>
</providers>
</siteMap>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="On" defaultRedirect="ErrorPage.aspx">
<error statusCode="404" redirect="LoginReg.aspx" />
</customErrors>
-->
<customErrors defaultRedirect="~/ErrorPages/GeneralErrorPage.aspx"
mode="On" />

<membership defaultProvider="SalonSqlMembershipProvider">
<providers>
<clear />
<add name="SalonSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="SalonConnectionString" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/Service2020" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="^.*(?=.{6,})(?=.*\d).*$" />
</providers>
</membership>
<roleManager enabled="true" defaultProvider="SalonNetRoleProvider">
<providers>
<clear />
<add name="SalonNetRoleProvider" connectionStringName="SalonConnectionString" applicationName="/Service2020" type="System.Web.Security.SqlRoleProvider, &#xA; System.Web,&#xA; Version=2.0.0.0,&#xA; &#xA; Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
</roleManager>
<httpHandlers>

<remove path="*.asmx" verb="*" />
<add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
<add verb="*" path="ThumbnailHandler.ashx" type="NotesFor.ThumbnailHandler, NotesForGallery"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</httpModules>
</system.web>
<location path="ChangePassword.aspx">
<system.web>
<authorization>
<allow users="?" />
<deny users="*" />
</authorization>
</system.web>
</location>
<location path="PasswordRecovery.aspx">
<system.web>
<authorization>
<allow users="?" />
<deny users="*" />
</authorization>
</system.web>
</location>

<system.net>
<mailSettings>
<smtp from="studio@smsmain.com">
<network host="mail.smsmain.com" password="marla5" userName="studio@smsmain.com" />
</smtp>
</mailSettings>
</system.net>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="WarnAsError" value="false" />
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5" />
<providerOption name="OptionInfer" value="true" />
<providerOption name="WarnAsError" value="false" />
</compiler>
</compilers>
</system.codedom>
<!--
The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<remove name="ScriptHandlerFactory" />
<remove name="ScriptHandlerFactoryAppServices" />
<remove name="ScriptResource" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

</configuration>
Roger Martin
#6 Posted : Wednesday, 2 March 2011 9:17:15 PM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,300
Location: Fort Atkinson, WI

All right. I suggest you revert your web.config to its original state so that your app works again. Then carefully add pieces back to the file, testing it frequently along the way. When all the pieces are back in, then try loading the gallery in the browser.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.