#1  
09-19-2015, 02:29 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,310
Thanked 654 Times in 457 Posts
I need help with something.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Ads / Sponsors
 
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
09-19-2015, 08:47 AM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 Posts
yep Fire away
Reply With Quote
  #3  
09-19-2015, 03:12 PM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,310
Thanked 654 Times in 457 Posts
I'm really hoping you can help here.

I'm trying to install Screwturn Wiki 5: http://sunhorizon.info/Help.InstallSqlServer
But I keep running into tons of errors.

Do you have your own Windows dev environment where you can test this? (preferably Windows 2012 R2, SQL Express 2014)
It would be good to see if somebody else can successfully install this on their own servers.

And no, I've not discounted the possibility that this isn't just a PEBKEC/id10t error just yet.

The instructions at the STW5 site are not at all newbie-friendly, and the current dev is not very responsive. I've not developed anything that requires ASP.NET or SQL in more than 6 years now. (We've been doing everything in PHP and MySQL in recent years. Partially because it's easier, partially because that's just where everything is going nowadays.) So I'm just guessing, and it's not going well. I think the error is in my manual SQL setup. Even before 2009, since 2006, we've been spoiled by Plesk. So I've not created anything manually in almost 10 years now.

This is the latest issue:

Code:
Server Error in '/wiki5' Application.
Login failed for user 'wiki_user'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'wiki_user'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Login failed for user 'wiki_user'.]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +414
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
   System.Data.SqlClient.SqlConnection.Open() +96
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerGlobalSettingsStorageProvider.GetCommand(String connString) +67
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerGlobalSettingsStorageProvider.ValidateConnectionString(String connString) +34

[InvalidConfigurationException: Provided connection string is not valid]
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerGlobalSettingsStorageProvider.ValidateConnectionString(String connString) +94
   ScrewTurn.Wiki.Plugins.SqlCommon.SqlStorageProviderBase.SetUp(IHostV50 host, String config) +39
   ScrewTurn.Wiki.StartupTools.Startup() +228
   ScrewTurn.Wiki.Global.Application_BeginRequest(Object sender, EventArgs e) +127
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248
For years, we've been wanting to get a wiki online at this site, and some recent developments have made it all the more urgent. Right now, I can get Screwturn Wiki 3 to work fine with flat files. (The visual editor in v3 is broken in modern browsers, thus unusable.) The v3 SQL edition is throwing errors, but I think it's because that code is too old (pre-IIS7/8, older SQL). At one point, the SQL edition it was actually in use here, before we upgraded to IIS7 in 2009.

v5 flat files version relies on SQL Compact (SQLCE), but there seems to be an issue with SQLCE and Windows 2012 IIS8. From what I was reading, it has to be recompiled from source, and that's really out of question as well.

via PM, I can look to give you some various minor access to our IIS7 test server, though the best approach would be simply in helping me go step-by-step to properly manually config the database -- assuming that's the issue. We'd even be willing to buy a cheap Windows 2012 R2 VPS for a month, if you're sure that this can be done. Then we can give you admin/RDP access to it. Perhaps set it up local first.

Still able/willing to help?

Update:

I think the database is correct now. This is the new error:

Code:
Server Error in '/wiki5' Application.
The ConnectionString property has not been initialized.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidOperationException: The ConnectionString property has not been initialized.]
   System.Data.SqlClient.SqlConnection.PermissionDemand() +5360010
   System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +20
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
   System.Data.SqlClient.SqlConnection.Open() +96
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerSettingsStorageProvider.GetCommand(String connString) +73
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerSettingsStorageProvider.ValidateConnectionString(String connString) +34

[InvalidConfigurationException: Provided connection string is not valid]
   ScrewTurn.Wiki.Plugins.SqlServer.SqlServerSettingsStorageProvider.ValidateConnectionString(String connString) +146
   ScrewTurn.Wiki.Plugins.SqlCommon.SqlStorageProviderBase.SetUp(IHostV50 host, String config) +39
   ScrewTurn.Wiki.ProviderLoader.SetUp(Type provider, String configuration) +305
   ScrewTurn.Wiki.ProviderLoader.LoadStorageProviders(List`1 storageProviders) +314

[ArgumentException: Could not load the provider with name: ScrewTurn.Wiki.Plugins.SqlServer.SqlServerSettingsStorageProvider - in assembly: SqlServerProviders]
   ScrewTurn.Wiki.ProviderLoader.LoadStorageProviders(List`1 storageProviders) +853
   ScrewTurn.Wiki.StartupTools.Startup() +341
   ScrewTurn.Wiki.Global.Application_BeginRequest(Object sender, EventArgs e) +127
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34248

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #4  
09-20-2015, 05:47 PM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 Posts
Did you edit your web.config?
Code:
<add key="SettingsStorageProviderConfig" value="Data Source=(local);Initial Catalog={dbnamehere};User ID=wiki_user;Password={password};" />
I'm a bit behind here because I have to do all the web/db setup from scratch before I can even look at it

Update:

ok I see you did that step
Reply With Quote
  #5  
09-20-2015, 06:34 PM
kpmedia's Avatar
kpmedia kpmedia is offline
Site Staff | Web Hosting, Photo
 
Join Date: Feb 2004
Posts: 4,311
Thanked 374 Times in 341 Posts
Since we have managed support from LiquidWeb, I asked them about this last night. After testing the script themselves, and arriving at the same issue, they believe the problem lies with either the 'SqlServerProviders.dll' (ie, it's not compatible with current SQL Express versions), or with Windows 2012 R2 IIS8, or perhaps even with 32-bit vs. 64-bit OS.

The developer claims it works on 2008, but I've not gotten anywhere with 2008 R2 IIS7.5 either.

The main project page is here: https://stw.codeplex.com/SourceContr...ssemblyInfo.cs
The source code is available, though I'm not skilled enough to edit it, and recompile it.


Attached Files
File Type: zip stw-de8306a85fb09e642d77041d1149e07757061717.zip (21.50 MB, 5 downloads)

- Did my advice help you? Then become a Premium Member and support this site.
- Please Like Us on Facebook | Follow Us on Twitter

- Need a good web host? Ask me for help! Get the shared, VPS, semi-dedicated, cloud, or reseller you need.
Reply With Quote
  #6  
09-21-2015, 01:12 AM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 Posts
That zip stopped at 4MB, and the spot in the source is https://stw.codeplex.com/SourceContr...rverProviders/
I'm getting
Code:
Global Settings Storage Provider must be specified in the Web.congfig file.
instead.

I can compile it.
Reply With Quote
  #7  
09-21-2015, 01:57 AM
kpmedia's Avatar
kpmedia kpmedia is offline
Site Staff | Web Hosting, Photo
 
Join Date: Feb 2004
Posts: 4,311
Thanked 374 Times in 341 Posts
The server attachment download stalled for you at 4mb? Odd. But I do know that it can sometimes happen when your ISP is dropping packets. That even happens to me.

Both myself and LiquidWeb think that the instructions are wrong.
I know this for a fact with the SQL CE "flat file" (not really a flat file) version.

The SQL string should be
Code:
<add key="GlobalSettingsStorageProviderConfig" value="Data Source=localhost\SQLEXPRESS;Initial Catalog=ScrewTurnWiki;User ID=wiki_user;Password=password;" />
The one thing I'm not 100% confident on is the data source. It could also be the server hostname. Right now, they both don't work equally.

The web.config look even more wrong for the SQL edition, as SQL CE commands are seemingly still around. Both I and LiquidWeb techs played with that, and we only ran into more errors.

Your link is bringing up some sort of index, not what you had intended.

If you could correct whatever is wrong, and recompile it, that would be incredibly helpful. Right now, we're working on the third major revision for this site. The SQL version of Screwturn may be an integral part of it. The SQL CE version will collapse under our traffic, so it's sadly not an option.

Do you have somewhere that you can test this? Either Windows Server 2012, or at least a Windows 8.1 desktop?

- Did my advice help you? Then become a Premium Member and support this site.
- Please Like Us on Facebook | Follow Us on Twitter

- Need a good web host? Ask me for help! Get the shared, VPS, semi-dedicated, cloud, or reseller you need.
Reply With Quote
  #8  
09-21-2015, 02:58 AM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 Posts
(local) is a thing, see
https://blogs.msdn.com/b/sql_protoco...edirected=true
Quote:
localhost\SQLEXPRESS
would mean server, instance. You probably have one instance though.

I have everything installed here.

I think I grasp this stuff. I think it works in the right circumstances because there's a test harness in the source and presumably they wouldn't release it if the tests didn't work. I'd like to run the unit tests myself and see if they work.

If all else fails, I can hardcode the connection string and compile a new dll (which is exactly what they do in the tests; all the code is written for this, I just have to copy/paste stuff). If that works, then at least we know the thing can work, then it's a matter of finding out why it's not reading the config. I could simply make a version to read our own config and leave it at that.

At the moment I'm getting
Quote:
The ConnectionString property has not been initialized
For some reason it's not picking up this value; some ideas are, the right key isn't being added, or it's not added in the right leaf of the XML tree. In any case, even if the connection string is wrong it doesn't matter, it's simply not finding any connection string. The solution would be to find the code that gets the connection string and trace what it's doing. So I guess I'm at the same point as you now. Bedtime here.

And here it is (source code written in C# from StartupTools.cs, which implements a class method):
Code:
		/// <summary>
		/// Gets the Global Settings Storage Provider configuration string from web.config.
		/// </summary>
		/// <returns>The configuration string.</returns>
		public static string GetGlobalSettingsStorageProviderConfiguration() {
			string config = WebConfigurationManager.AppSettings["GlobalSettingsStorageProviderConfig"];
			if(config != null) return config;
			else return "";
		}
That tells me the key must be in the XML section <appSettings> with the name GlobalSettingsStorageProviderConfig, in other words, the web.config file must look like this:
Code:
 <appSettings>
<add key="SettingsStorageProviderConfig" value="" />
</appSettings>
For example. Except that's not the setting we're having a problem with. I'll keep reading the code. So far, so good...

Last edited by jmac698; 09-21-2015 at 03:31 AM.
Reply With Quote
  #9  
09-21-2015, 03:24 AM
admin's Avatar
admin admin is offline
Site Staff | Web Development
 
Join Date: Jul 2003
Posts: 4,310
Thanked 654 Times in 457 Posts
Quote:
Originally Posted by jmac698 View Post
At the moment I'm getting
For some reason it's not picking up this value; some ideas are, the right key isn't being added, or it's not added in the right leaf of the XML tree. In any case, even if the connection string is wrong it doesn't matter, it's simply not finding any connection string. The solution would be to find the code that gets the connection string and trace what it's doing. So I guess I'm at the same point as you now. Bedtime here.
Yep. That's where everybody is getting stuck.

- Did this site help you? Then upgrade to Premium Member and show your support!
- Also: Like Us on Facebook for special DVD/Blu-ray news and deals!
Reply With Quote
  #10  
09-23-2015, 01:47 PM
jmac698 jmac698 is offline
Free Member
 
Join Date: Dec 2010
Posts: 387
Thanked 73 Times in 56 Posts
I've found that another setting at least tries to connect to database;
Code:
<add key="GlobalSettingsStorageProviderConfig" value="Server=.\SQLEXPRESS;User ID=sa;Password=password;Database=screwturn;Initial Catalog=screwturn"/>
According to http://www.connectionstrings.com/sql-server/

You can use Data Source= or Server= and then localhost\sqlexpress or .\sqlexpress or (local), then to pick the database you use Database= or Initial Catalog=. I found that if I supply the wrong password, I get a wrong password error, which tells me that it's actually connecting. In this way I can prove which server and credential settings work. Now the only point at which I'm stuck, is I always get "The system cannot find the file specified", which seems to hint to me that the only thing left that could be wrong, is the database name. In this case I would experiment with short, all lowercase database names. It theoretically could be a firewall or remote connection issue, but since I tried (local) as well as server location strings, that's probably not it. I haven't found exactly the code which reads the connection string, but I think it starts here:
Code:
globalSettingsStorageProvider.SetUp(Host.Instance, GetGlobalSettingsStorageProviderConfiguration());
-- merged --

I found the code, pretty sure the GlobalSettingsStorageProviderConfig is the only one that matters. Connection strings are standard, so you can look those up anywhere. I'm installing visual studio so I can see what config it's reading, and if that's right, then I'll write a small program to open the database and see if I can figure out what's wrong. ps don't think you need a database expert, more like c# asp web backend developer.

-- merged --

Good news, I found the problem. I compiled it, and found out what it was reading for a config. It's missing the database part (Database=). I don't know why yet, but I can fix it with our own file. Problem is, that might be readable from the web server so it's safer to hardcode it. I'll leave it in a private.
-- merged --

ok, I forced the config string and it's still not working, now to write a small program to open a database.
Reply With Quote
  #11  
09-23-2015, 08:58 PM
lordsmurf's Avatar
lordsmurf lordsmurf is online now
Site Staff | Video
 
Join Date: Dec 2002
Posts: 13,501
Thanked 2,447 Times in 2,079 Posts
I'm really glad that you're looking in this. You're really good with code, and if anybody can figure with out, it may be you.

I've been having some advanced conversations with fellow video restorationists recently, and your name came up. We were talking about that software TBC. We have some new ideas on how you continue that. I looked at the code myself, and it was promising. I want to contact you about that in about a month, when I have a bit more free time.

- Did my advice help you? Then become a Premium Member and support this site.
- For sale in the marketplace: TBCs, workflows, capture cards, VCRs
Reply With Quote
The following users thank lordsmurf for this useful post: jmac698 (09-23-2015)
  #12  
10-16-2015, 03:51 PM
kpmedia's Avatar
kpmedia kpmedia is offline
Site Staff | Web Hosting, Photo
 
Join Date: Feb 2004
Posts: 4,311
Thanked 374 Times in 341 Posts
Any update on this?

The STW5 dev finally got back to me:

(1) Oddly, he did not mention SQL at all.

(2) He mentioned that SQL CE can be tricky to install. (However, the traffic limitation of CE will be too low for this site. All that effort to get it working, and it was all mostly-wasted effort. We can demo STW5, be in-production use is out.)

(3) He asked about MySQL, and stated adding it back is viable. I have a STW3 mod that I offered him, in my last email. He said the STW3 devs removed it from STW2. I suggested that an open-source project needs an open-source database (MySQL, not SQL). Hopefully he's looking into it.

The last email took 3 weeks to respond to. At least it's something, but I'm not 100% confident.

Looking closer at the server, SQL made a database, added some tables, then failed without a specific error. Yet another 2012 dev server has been setup, and I'll look to test it when I have some time.

- Did my advice help you? Then become a Premium Member and support this site.
- Please Like Us on Facebook | Follow Us on Twitter

- Need a good web host? Ask me for help! Get the shared, VPS, semi-dedicated, cloud, or reseller you need.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
VCR service experts? My Mitsubishi HS-U70 is on the fritz! Tasuke Video Hardware Repair 5 11-27-2014 11:32 AM

Thread Tools



 
All times are GMT -5. The time now is 04:46 AM