|
|
Hi,
I am facing a problem running a website. The error msg is as follow:
Server Error in '/xxxxx' Application.
--------------------------------------------------------------------------------
Login failed for user 'xxxxx'.
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 'xxxxx'.
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 'xxxxx'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846887
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +35
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +144
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +342
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +221
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +189
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +185
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +433
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +499
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
System.Data.SqlClient.SqlConnection.Open() +122
CFECourses.main.Page_Load(Object sender, EventArgs e) in C:\Inetpub\wwwroot\xxxxx\main.aspx.vb:50
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
************************************************************
The connection string in the global.asax is:
Application("DBConnect") = "Server=localhost;uid=xxxxx;pwd=xxxxx;database=xxxxx"
***************************************************************
The error occurs when I run this application in backup server. It works well in the previous webserver. I think the error is in connection string but still don't get idea how to fix. Pls help me!
Do I need to type in the server name or just local host?
modified on Tuesday, August 4, 2009 10:51 PM
|
|
|
|
|
panyaung wrote: Exception Details: System.Data.SqlClient.SqlException: Login failed for user 'cfeuser'.
Here's the gist of your problem. I see that you're using localhost as your database server in your connection string; does the database server on localhost have a user named cfeuser ? Does it have the same password? Hell, is the database even installed there?
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Yes, I have that user and password. The database is also installed.
Still finding the solution. Thanks for your reply!
|
|
|
|
|
panyaung wrote: The connection string in the global.asax is:
Application("DBConnect") = "Server=localhost;uid=xxxxx;pwd=xxxxx;database=xxxxx"
So, Does your current hosting server and the database server are same?
|
|
|
|
|
Yes, they r on the same machine.
|
|
|
|
|
use the IP address instead of using name
|
|
|
|
|
Is it possible to a asp page trigger a c# application?
(C# application + free web hosting asp page in the same computer)
can the asp page show c# application in the browser?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
What do you mean by C# application? A stand-alone application written on C#? If yes, you can't show it on a browser.
|
|
|
|
|
no stand alone, stored in dir in free web host
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I have a login User Control on my masterpage, and many pages one being a Contact Page.
When you are on the Contact page, the button on the Contact page will not fire the RequiredFieldValidators on the Login User Control, which is correct.
However, when you click the button on the Login User control, it will fire the RequiredFieldValidators on the Contact page, which I do not want.
Now I've tried putting them each in different ValidationGroups, and that didn't work.
I also tried removing all the validation fron the User Control and setting the CausesValidation to False, and that didn't work.
As always any replys, will be very much appreciated.
Thanks,
the_smiths.
|
|
|
|
|
Hi,
My ASP.Net project uses DirectorySearcher to do a r/w operation against the Active Directory server instance. I have a stacktrace below of an error that I encounter when my DirectorySearcher instance calls FindAll(). I was wondering if this has got to do with permissions that I may not have to perform this kind of operation. Appreciate any help, thanks.
Server Error in [...]
--------------------------------------------------------------------------------
The specified domain either does not exist or could not be contacted
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.Runtime.InteropServices.COMException: The specified domain either does not exist or could not be contacted
Source Error:
Line 222: SearchResultCollection userList = directorySearcherInstance.FindAll();
Stack Trace:
[COMException (0x8007054b): The specified domain either does not exist or could not be contacted]
System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
System.DirectoryServices.DirectoryEntry.Bind()
System.DirectoryServices.DirectoryEntry.get_AdsObject()
System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)
System.DirectoryServices.DirectorySearcher.FindAll()
[...]Global.Session_Start(Object sender, EventArgs e) in [...]\global.asax.cs:46
System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e)
System.Web.SessionState.SessionStateModule.OnStart(EventArgs e)
System.Web.SessionState.SessionStateModule.CompleteAcquireState()
System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData)
System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
Please show use the code block where you created the object of directory entry class.
|
|
|
|
|
Hi all,
Need your suggestions
How should i approach testing functions in a ASP.NET application.
Its not integration testing but a unit testing(functions) But the problem is
It is nearly impossible to isolate a function due to dependencies
Many funcition are expecting other objects like Page Class context, Configuration settings many more complex objects like session context... etc
now how can i test this methods using Nunit framework
how should i initialized these objects ?
should i use mock object concept ?
is Nunit framework appropriate tool for writing the test cases ?
Please suggest
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
modified on Tuesday, August 4, 2009 3:55 PM
|
|
|
|
|
If you write good code, then your business tasks will be isolated from UI, and can be tested.
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.
|
|
|
|
|
Thanks Chris for your reply
Thats the problem UI layer is having business rules implemented making quite hard to test the application.
We are going to rewrite the application using MVC architecture but before to that we need to write Nunit test cases for existing application.
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Sandeep Akhare wrote: now how can i test this methods using Nunit framework
You need to isolate the dependencies. Separate the code into several projects and have a single project for all your ASPX files. Now you can write tests for the other projects. Other projects should not get a reference to System.Web .
Sandeep Akhare wrote: how should i initialized these objects ?
should i use mock object concept ?
Probably yes. You need to create an interface which wraps HttpContext . Inject this interface as a dependency to your business classes. Read more about dependency injection[^].
In your test cases, you can mock this interface and set expectations. I suggest Rhino Mocks[^] for mocking.
It is a wise idea to program to interfaces than implementations.
Sandeep Akhare wrote: is Nunit framework appropriate tool for writing the test cases ?
Yes. Its a great piece of work.
|
|
|
|
|
Hey Navaneeth Congrates for becoming MVP!
N a v a n e e t h wrote: You need to isolate the dependencies. Separate the code into several projects and have a single project for all your ASPX files. Now you can write tests for the other projects. Other projects should not get a reference to System.Web.
You mean to seperate the business layer from UI only for Testing purpose ?
for other suggestions i need to look in to them.
Thanks for reply
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
Thanks
Sandeep Akhare wrote: You mean to seperate the business layer from UI only for Testing purpose ?
Separating business logic from UI is good not only for testing but also for improved maintainability. If you have business logic tied close to UI, it will be hard to write automated test cases. So the first step in your case would be to re-factor code to support automated testing.
|
|
|
|
|
Hi Navneeth,
We are planning to re-factor the application for next release.
But for current application i have to write the test cases for such complex application.
I read the links you have mentioned but still i am not able to conclude anything
1. Wraping of httpContext :- does it mean creating the app domain for your application ?
2. inserting the dependency object still i am not sure how i will insert it ?
Problem is
Page is derived from one base class which is derived from another base class nad interfaces
There are many properties and objects some of these properties are readonly like sessionContext
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
hi,
In my project, i have some roles like Department manager, Project manager, team leader,etc. Each member inroled in the role have some rights to view the progress of the on going project of the company.
i want to assign some rights to each group of users like team leader can only view the progress of part of his project & can take action for all the members in his team(assign work among members), on the other hand, project manager can view all the teams working under his project(can take action to all members working under him), same to the department manager can view all the projects of the department(same actions he can perform).
help me making some class hierarchy of my application which would help me.
at the time of login and got the role of the incoming user,now how i work over the controls e,g, same grid for all users but if project manager view the form it will only show the info of his project and if depart manager get login it will show all projects of the whole department.
i am looking for some "multi layer architecture" for the application.
looking for reply.
Saboor Ahmed Awan
saboorahmedawan@gmail.com
|
|
|
|
|
Hi...
See class and everything you can design as per your requirement.
I am giving answer to your last question....
while binding grid or dropdown each time u have to pass RoleId....& based on this role id only you fetch record from database only....
Hope your DB design will be fine so that u can use this roleid with inner join to other table.
but you do everything at db level only...
so if different different user will login they can see their related data only.
|
|
|
|
|
|
y u post ur question again & again???...
Please clarify you requirement in detail.
|
|
|
|
|
Hi ,
Can you help me how to create dynamic checkbox control in gridview control
Thanks
Vijaykumar
|
|
|
|
|