Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2008, 10:15 AM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default turning off user instances in express

HI all,

My problem:
I want to run full text search on my local db on sql express. I have installed this on express using the business development toolkit, but for this to run I user instances need to be turned off.
I developed the site exactly like the book with:
Windows authentication, the db created in visual studio, my connection string that works before this is:

<remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;Integrated Security=True; User Instance=true;AttachDBFilename=|DataDirectory|aspn etdb.mdf"
   providerName="System.Data.SqlClient" />

            </connectionStrings>


But when I change this to below and remove user instances it won't connect:

<remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Server=.\SQLEXPFULLSEARCH;Integr ated Security=True;Database=hiaspnetdb;
  " providerName="System.Data.SqlClient" />

I've setup II7 on vista and use this to test before moving it to full sql 2005 on the hosted server which has full text search but need to test and debug locally.

Possible solutions:
1. buy sql 205 (too expensive and I'd have to set it all up)
2. Keep uploading pages to hosting server and test code there.(no way ideal.

3. What I would like to do:

Change windows authentication to sql on express and changing the connection string.
(this is where I think i'm going wrong.)

Changing the sa password in managment studio under windows mixed mode won't let me connect back logging in to my database under sql authentication. How do you set up this expecially if I'm using vista?

Or:
Somehow get windows authentication to run with the user instance turned off.
I have given the nework service pemmission but no luck.

Any advice or new approach would make me happy indeed, as I'm stuck adn would like to learn and develop my skills using this setup.
I believe I need to attach the db but not dynamically which is proberely where I'm going wrong.

Hope you can help.







 
Old March 18th, 2008, 10:34 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

Jez - here's what i have (with values changed to match yours) and i also use fulltext search locally:

    <connectionStrings>
        <remove name="LocalSqlServer"/>
        <add name="LocalSqlServer" connectionString="Server=.\SQLExpress;Integrated Security=True;Database=hiaspnetdb;Asynchronous Processing = true" providerName="System.Data.SqlClient"/>
    </connectionStrings>

i don't think i did anything 'special' other than that to get it going.

jimi

http://www.originaltalent.com
 
Old March 18th, 2008, 11:07 AM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the quick response, I'll give it a go. Are you running sql express in windows or sql authentication?

 
Old March 18th, 2008, 12:01 PM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried the string but didn't work for some reason, I get a new error:

System.Reflection.TargetInvocationException was unhandled by user code
  Message="Exception has been thrown by the target of an invocation."
  Source="mscorlib"
  StackTrace:
       at System.RuntimeMethodHandle._InvokeMethodFast(Objec t target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.Web.UI.WebControls.ObjectDataSourceView.Inv okeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
       at System.Web.UI.WebControls.ObjectDataSourceView.Exe cuteSelect(DataSourceSelectArguments arguments)
       at System.Web.UI.DataSourceView.Select(DataSourceSele ctArguments arguments, DataSourceViewSelectCallback callback)
       at System.Web.UI.WebControls.DataBoundControl.Perform Select()
       at System.Web.UI.WebControls.BaseDataBoundControl.Dat aBind()
       at System.Web.UI.WebControls.GridView.DataBind()
       at System.Web.UI.WebControls.BaseDataBoundControl.Ens ureDataBound()
       at System.Web.UI.WebControls.CompositeDataBoundContro l.CreateChildControls()
       at System.Web.UI.Control.EnsureChildControls()
       at System.Web.UI.WebControls.CompositeDataBoundContro l.get_Controls()
       at MB.HealthInvestor.Helpers.SetInputControlsHighligh t(Control container, String className, Boolean onlyTextBoxes) in j:\HI Website development\healthInvestorSol\App_Code\Helpers.cs: line 224
       at MB.HealthInvestor.Helpers.SetInputControlsHighligh t(Control container, String className, Boolean onlyTextBoxes) in j:\HI Website development\healthInvestorSol\App_Code\Helpers.cs: line 225
       at MB.HealthInvestor.Helpers.SetInputControlsHighligh t(Control container, String className, Boolean onlyTextBoxes) in j:\HI Website development\healthInvestorSol\App_Code\Helpers.cs: line 225
       at MB.HealthInvestor.Helpers.SetInputControlsHighligh t(Control container, String className, Boolean onlyTextBoxes) in j:\HI Website development\healthInvestorSol\App_Code\Helpers.cs: line 225
       at MB.HealthInvestor.Helpers.SetInputControlsHighligh t(Control container, String className, Boolean onlyTextBoxes) in j:\HI Website development\healthInvestorSol\App_Code\Helpers.cs: line 225
       at MB.HealthInvestor.UI.BasePage.OnLoad(EventArgs e) in j:\HI Website development\healthInvestorSol\App_Code\BasePage.cs :line 51
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Any ideas?
 
Old March 18th, 2008, 12:03 PM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This was do to not opening the db:
Cannot open database "hiaspnetdb" requested by the login. The login failed
Still having probs here.

 
Old March 18th, 2008, 12:13 PM
Authorized User
 
Join Date: Jan 2007
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by JezHarvey
 Thanks for the quick response, I'll give it a go. Are you running sql express in windows or sql authentication?
Hey JezHarvey, I believe the value "integrated security = true" means that it is windows authentication.

I've had your problem as well; I've been trying to make more than 1 connection to my local sqlexpress database, and I believe this requires sql authentication, but I couldn't figure out how to do it.

In the end, my host allows for remote database connections, so I just attached the remote database to my project and simply worked from it directly. This way, I can still use my local pages and visual studio's development server (so, no uploading).

 
Old March 18th, 2008, 12:49 PM
Authorized User
 
Join Date: Mar 2008
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I asked my host but can't remote connect.
But I have managed to set up sql authentication in sql express and login as sa with pass and then attach the database there.
I just still can't connect to it with the right connection strings I believe.

I'm still getting failed login for user 'nt authorty\network service' or user 'sa'.
This should be simple but I don't understand where I'm going wrong






Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple instances of paging user control thas123 ASP.NET 2.0 Professional 0 February 28th, 2008 02:24 AM
SQL Express User Instance...avoiding aspdewd SQL Server 2005 1 October 27th, 2007 10:12 PM
Generating user instances in SQL Server is disable oa1111 ASP.NET 2.0 Basics 0 August 17th, 2007 10:34 AM
C# and SQL express 2005, multi-user access ?? Boudy C# 2005 4 February 27th, 2007 04:43 AM
Accessing a SQL Server Express DB thru VB Express djelavic SQL Server 2005 2 February 21st, 2006 07:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.