 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
|
|
|
|
|

July 29th, 2012, 12:30 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
HI jdlferreira,
can you please tell me what connection string you used for database and entity.
Please specify full connection string from <add name="ConnectionString" Data Source="" Provide="">
Just mark ***** for user id, password, database name, server but tell me the complete string.
Many thanks
|
|

July 29th, 2012, 04:21 PM
|
|
Authorized User
|
|
Join Date: Jun 2012
Posts: 27
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Sure.
This is the database string given by my host:
Code:
workstation id=orangefresh.mssql.somee.com;packet size=4096;user id=****;pwd=****;data source=orangefresh.mssql.somee.com;persist security info=False;initial catalog=orangefresh
And here is the string for Entity:
Code:
metadata=res://*/App_Code.Orangefresh.csdl|res://*/App_Code.Orangefresh.ssdl|res://*/App_Code.Orangefresh.msl;provider=System.Data.SqlClient;provider connection string="workstation id=orangefresh.mssql.somee.com;packet size=4096;user id=****;pwd=****;data source=orangefresh.mssql.somee.com;persist security info=False;initial catalog=orangefresh"
Notice that the database string goes inside the " marks in the regular Entity string Visual Studio/Web Developer created in the web.config file.
Hope that helps.
|
|

July 30th, 2012, 11:17 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Not working for me.
Production strings are working at my local site but when I try to use that string in production site, then it is giving me error.
"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"
I am getting this error only on production site, using same string (production) on local site works fine.
Can anyone please tell me what may be the issue?
|
|

July 30th, 2012, 01:28 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Could be a network setup issue where you production machine is not able to "see" itself over the public network using its public name. Your host / sys admin should be able to help you out with this.
Cheers,
Imar
|
|

July 30th, 2012, 03:01 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Quote:
|
Could be a network setup issue where you production machine is not able to "see" itself over the public network using its public name.
|
if this is the case,
1. then why it is giving the username availability message on signup page.(I have used web method to check for existing users)
2. and why it is working for jdlferreira?
|
|

July 30th, 2012, 03:06 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
>> then why it is giving the username availability message on signup page.(I have used web method to check for existing users)
Don't know what this is referring to.
>> and why it is working for jdlferreira?
Unless you're hosting on exactly the same machine, there could be millions of reasons. Each server can be configured differently, with many OS, software and network settings that could influence this.
How about posting your connection strings so we can take a look?
Imar
|
|

July 31st, 2012, 11:04 AM
|
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
uhhh
I thought it would be done but I am struggling..
Quote:
|
How about posting your connection strings so we can take a look?
|
I analyzed that simple database connection string is working but not the entity string. But I am posting both
Code:
<connectionStrings>
<add name="ASPNETDBEntities" connectionString="metadata=res://*/App_Code.ProOnline.csdl|res://*/App_Code.ProOnline.ssdl|res://*/App_Code.ProOnline.msl;provider=System.Data.SqlClient;provider connection string="workstation id=PropOnline.mssql.somee.com;packet size=4096;user id=******;pwd=*******;data source=PropOnline.mssql.somee.com;persist security info=False;initial catalog=PropOnline;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
<add name="ConnectionString" connectionString="workstation id=PropOnline.mssql.somee.com;packet size=4096;user id=******;pwd=******;data source=PropOnline.mssql.somee.com;persist security info=False;initial catalog=PropOnline" providerName="System.Data.SqlClient" />
</connectionStrings>
Please address the issue...
|
|

August 2nd, 2012, 03:29 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Can't see anything wrong with this. Are you sure that a) this connection string is really used by EF at runtime and b) that EF is indeed causing the error? Maybe it's another connection string for other code that's causing the problem?
Imar
|
|

August 2nd, 2012, 02:39 PM
|
|
Friend of Wrox
|
|
Join Date: Oct 2009
Posts: 341
Thanks: 14
Thanked 3 Times in 3 Posts
|
|
Quote:
Are you sure that a) this connection string is really used by EF at runtime and b) that EF is indeed causing the error? Maybe it's another connection string for other code that's causing the problem?
|
How I can check these things, I have no idea to test that.
If you don;t mind can you please take a look at site.
UserName: test
Password: test123#
site: welcome.somee.com
It logs in and logs out users it means normal connection string is working.
After having being logged in go to http://welcome.somee.com/Member/
Now you will get the error, please help me at that point...
Many thanks
Last edited by sophia; August 2nd, 2012 at 02:44 PM..
|
|

August 3rd, 2012, 03:33 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
I can indeed see the error, but it's a bit unhelpful for me, as I have no idea what code is run when you access /Member. Could be anything.
>> How I can check these things, I have no idea to test that.
By looking at the code for the page that fails.
So, as asked before, please be specific. Tell us if /Member is just a folder or a configured application, shows us the relevant code for the page behind /Member, tells us what you expect to fire and when etc..... In other words: help us help you....
Imar
|
|
 |
|