|
Seriously, WTF. Session, Response??? This doesn't give you a clue??
only two letters away from being an asset
|
|
|
|
|
Barely, sounds like webcrap, I'm not into that at all
|
|
|
|
|
btw did you onevote me for not having a clue?
|
|
|
|
|
No, I did not. I'm not even sure what onevote is.
|
|
|
|
|
I am writing an XML web service in VS2008 using C#. SQL and VS are running on the same box. There are several SQL instances running because we are using the box to support our customers who are mixed 2005/2008 SQL server. From inside VS I can create a data connection to one of our SQL instances. The box is ESSERV and the instance is ES2008 so the connection string that is in the connection object is:
"Data Source=ESSERV\ES2008;Initial Catalog=ESData08;Integrated Security=True"
This works fine. I can see the ESData08 database, tables, SPs, etc. No problems. So in C# I use the following code:
String sqlConn = "Data Source=ESSERV/ES2008;Initial Catalog=ESData08;Integrated Security=True";
SqlConnection esConn = new SqlConnection(sqlConn);
esConn.Open();
YES, I flipped the backslash between ESSERV and ES2008 to a forward slash. MSDN said that was OK to do so it doesn't look like an escape sequence. And here is part of what I get:
System.Data.SqlClient.SqlException: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.SqlClient.SqlInternalConnection........... and about 2 dozen more lines of error.
So my question is WHY? I have tried every combination of ESSERV\ES2008 and all of them give me the same error. Named Pipes are enabled. So what is causing this error and is there a way to specify the data connection I have already defined and know works. I'm kind of new to VS and C# but I'm sure that the code is correct as it compiles and runs up to the open. Any help with this nightmare would be appreciated.
Thanks,
Joe B
|
|
|
|
|
In case you aren't aware of it there is an excellent site connectionstrings.com[^], that can be very useful in situations like this.
It offers connection strings for most scenarios.
This[^] thread talks about the same error you have, and the first answer says it has the solution. I haven't followed the link, as I don't use named pipes and therefore cannot tell if that is correct.
Anyway, good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Henry,
Thanks for the response but NO. Not one of the connection strings worked. This is unbelievably frustrating. I am now 12 hours into beating my head against this issue. SOMEONE must know what is in the way. EVERY single think I tried returns this:
System.Data.SqlClient.SqlException: 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
MICROSOFT..... ARE YOU LISTENING??????? 12 hours for a connection string. I am NOT a db admin, nor a network admin. I write code and this is NOT GOOD. It can't be this hard to connect to a SQL Server that's on the same machine as the Web Service.
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
delete
modified 2-Apr-21 5:21am.
|
|
|
|
|
Define what you mean by "active"? Use English and not the TXTSpeak garbage.
|
|
|
|
|
Message Closed
modified 2-Apr-21 5:21am.
|
|
|
|
|
If you're lucky, that's stored in the registry and you can look it up. Otherwise, I don't see how you're likely to work it out. But, you need to work out how it's stored by firefox, at this stage this is a 'how does firefox work' question, not a C# question.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Firefox stores all its user settings in the user's Application Data folder, so you'll need to hunt in there.
For any more info, you'll probably need to delve into the source tree
|
|
|
|
|
|
he posted just a code snip where he gets the Uninstallstring from registry of the selected node in the treeview. comparing the text of the node with the DisplayName coming from registry..
|
|
|
|
|
where will we get text of the node from is it treenode of registry
|
|
|
|
|
he uses a treeview on a form
the treeview is build at initialize or some where else...
this snip is only finding the correct uninstallstring according to the selected node..
take a look an System.Windows.Forms.TreeView and Microsoft.Registry to understand!!
|
|
|
|
|
hi.
i want write cms project but i dont how create anew webform.
iwant until press button ,create a webform with c#.
i must use whaat code?
please code me!!!!!!!!!!!!!
|
|
|
|
|
I'm not handing you any code, instead you get my advice to buy and study a book. You have a lot to learn judging from your post.
Do it, do it now!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
it's just like "I have a screwdriver and I want to build a plane"..
forget it, learn first how to write a hello world in C#.
|
|
|
|
|
|
torabi23 wrote: please code me
Realizing that English is probably not your native tongue, I will let you know that no one here is likely to code a cms up for you for free. We are here to help you if you have a specific question but most of us are way too busy with our own jobs...
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
torabi23 wrote: please code me!!!!!!!!!!!!!
Wow. Just wow.
torabi23 wrote: i want write cms project but i dont how create anew webform
If you don't know how to post in the right forum, how to create a blank form, how to ask a question, then it's plain you need to contact your 'client' and tell them that you are a con artist. You obviously have less than no idea. If you thought about this at all, you'd realise that no-one can, in a forum reply, tell you how to write a CMS, starting from 'how to create a blank form'. I doubt any books exist that cover all of that, in one go from absolute beginner through to professional code.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello,
Now I have an array of 7 bits bytes or a string I want to take the last bit from the second byte and add it to the right most of the first and so on which will result in a new 8 bits byte Is there any direct way to do that than using loops and arrays? Example http://www.dreamfabric.com/sms/hello.html How can I do this by c#?
Thanks.
Dad
|
|
|
|
|
Shouldn't be too difficult to figure out an algorithm for it... Some hints:
1) To check the rightmost bit of a number: (x % 2) // Remainder when dividing by 2) The generic form would be (x % (1 << numBits)) to get any number of bits.
2) To remove the rightmost bit: (x >> 1) // Shift right one bit
3) To add a bit to the left of a number: (x + (newBit << currentBitCount))
As for the algorithm, you know exactly how many bits are moving into and out of each byte... Each group of eight septets turns into 7 octets... So the formulae are:
oct0 = s0 + ((s1 % (1 << 1)) << 7)
(Start with septet 0, get 1 bit from septet 1, shift it 7 places left, and add it to septet 0)
oct1 = (s1 >> 1) + ((s2 % (1 << 2)) << 6)
(Shift out one bit, since we moved it to octet 0, grab 2 bits from the next byte, shift 6 places, since we're one place shorter, and add)
oct3 = (s2 >> 2) + ((s3 % (1 << 3)) << 5)
See the pattern?
(A = this byte, B = next byte)
octN = (A >> N) + ((B % (1 << (N + 1))) << (7 - N))
Do that for 7 bytes, skip the 8th byte (All 7 bits from the 8th byte would be shifted to the 7th byte), and start over.
|
|
|
|
|
Hi,
In my C# program i'm filling data retrieved from the stored procedure in a excel sheet template. the excel sheets contains some 5 sheet. when i try to insert data into the sheet4 the program is returning me a error the object not found, the data are inserting into the sheet 1,2,3 without any problem. The program is not recognizing the sheet 4 or more. please help me...
Thanks,
Vinoth
|
|
|
|
|