Error Using Login Controls

May 14, 2008

Hello All,

I am recieving this error using vs2005.  I am using the login controls which creates a mdf file. i am not using sql server 2005 in this program.  The program runs well in my local machine, but as soon as i publish the site, i recieve this error after i login into the site. 

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
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: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

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): An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +739123
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) +685966
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) +109
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +383
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +181
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
   System.Data.SqlClient.SqlConnection.Open() +111
   System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84
   System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197
   System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121
   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105
   System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42
   System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

 

 

does anyone know why?

 thank you,

 kagome

 

View 9 Replies


ADVERTISEMENT

MS SQL Server 2000, And ASP.NET 2.0 Membership Controls (login)

Dec 14, 2007

when my ASP.NET 2.0 web site working against MS SQL Server 2000,I Usually have a connection string to the DB, I create a connection, and start working on the data.
While reading about the MemberShip provider of ASP.NET 2.0 (Login control, Forgot password, etc.),I read that it's possible to save the MDF file of the membership controls, within the APP_DATA folder.
But how can it be ? the MDF file must be at the server folder,How can I access this MDF file ? with which connection string ?How does MS SQL Server 2000 syncronize against this MDF file within my APP_DATA folder ?
And by the way, if my hosting company allow me to use 1 db schema of the MS SQL Server 2000 server,Does this method (saving the MDF file within thr APP_DATA folder) allow me to use multiple schemas ?
Thanks.
 

View 4 Replies View Related

Membership, Roles And Login Controls With Sql Server 2000

Jul 4, 2007

 hello, I have developed a website using asp.net 2.0 and sql server 2005 express edition. I have used the built-in membership, roles and login controls in my website. now i need to change the database server. i have to use sql server 2000 instead. as asp.net 2.0 uses the ASPNETDB.mdf for member,roles and login controls, so how can i do it? i can easily export the database from 2005 to 2000 but how my application controls will know where to look at for those data. I am clueless. please help me. thanks in advance. 

View 2 Replies View Related

VWDExpress ASPNETDB.MDF SQL 2005 Express LOGIN CONTROLS

Sep 8, 2006

Could anyone please advise on a good hosting company that DOES support the above applications and any advice on the Login Controls for the uploaded database would be greatly appreciated.

View 1 Replies View Related

Porting VB 6 Data Controls To Use SqlDatasource Controls - Please Help!!!!

May 9, 2007

Hi,  I am porting a massive VB6 project to ASP.net 2005.  Most of the code is fine, however because the original developers used lots of data controls and my own time restrictions I thought to replicate the functionality by using Sqldatasource controls instead. 
 These data controls are bound to DBtruegrids.   The project has has lots of code like...
 AdodcOrders.Recordset.RecordCount > 0 or  If AdodcOrders.Recordset.EOF  or  AdodcOrders.Recordset.MoveNext()  or
AdodcDetail.Recordset!FieldName
The problem is the sqldatasource control doesn't have a recordset/dataset property which I can access and manipulate, or does it?  What should I do to get round these?  The project has thousands of lines like this in so its not feasible to rewrite it (although if I could I would!).
 Any suggestions please gratefully appreciated.
many thanks
mike

View 1 Replies View Related

Error: Cannot Open Database Requested In Login 'projectAllocations'. Login Fails. Login Failed For User 'sa'.

Oct 27, 2004

Hi,
Im getting this error when attempting to retrieve data from an sql database.

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: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.

Source Error:


Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()

Source File: C:finalyearproject2sample.aspx Line: 15



Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks

View 3 Replies View Related

Error With Data Mining Viewer Controls In Visual Studio 2008

Nov 20, 2007

Hello:

I have a framework 2.0 winforms application that uses the data mining viewer controls. I upgraded the project to visual studio 2008 and compiled it under framework 2.0. It compiles fine, but when the form with the TimeSeriesViewer control loads, the application throws the following exception:

System.Reflection.TargetInvocationException was unhandled by user code
Message="Unable to get the window handle for the 'AxChartSpace' control. Windowless ActiveX controls are not supported."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.AxHost.InPlaceActivate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at Microsoft.AnalysisServices.Viewers.TimeSeriesViewer.InitializeComponent()
at Microsoft.AnalysisServices.Viewers.TimeSeriesViewer..ctor()
at RMS2.UI.DecisionSupport.ShowModel(String modelName, Int32 tabIndex) in C:UsersDougDocumentsRmsIIRmsIIRMS2.UIDecisionSupport.cs:line 72
at RMS2.UI.DecisionSupport.DecisionSupport_Load(Object sender, EventArgs e) in C:UsersDougDocumentsRmsIIRmsIIRMS2.UIDecisionSupport.cs:line 42
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException: System.AccessViolationException
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32 iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr hwndParent, COMRECT lprcPosRect)
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.InPlaceActivate()
InnerException:


The control is being added programatically, as in the wiinforms samples. Can anyone suggest a workaround? Thank you in advance.

- doug

View 5 Replies View Related

Error String: Cannot Open Database Requested In Login 'XXXXXXXXXXX'. Login Fails.

Feb 29, 2008

Hi All

I am getting below error while


Error string: Cannot open database requested in login 'XXXXXXXXXXX'. Login fails.


what is possible casue for above problem.

View 5 Replies View Related

Cannot Open Database QuoteSystem Requested By The Login. The Login Failed.-ERROR!!

May 14, 2008

Cannot open database "QuoteSystem" requested by the login. The login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Last time I recieved this error I had to add ASPNet, NTAuthority, and myWebSiteUsers USERS under the database properties-->permissions setting for the specific database I am trying to access with the website but this database(QuoteSystem) does not lists any of these objects so I can add them. Does anybody know what I have to do to fix this?
I am using SQL Server 2005.

View 7 Replies View Related

Cannot Open Database Northwind Requested By The Login. The Login Failed............. ERROR

Aug 10, 2005

Please, can anyone tell me why I am getting the undermentioned error message when I develop my application as an IIS Site in Visual Web Developer 2005 Express ? I have already developed and successfully tested it as a 'FileSystem Web Site' .I am using SQLSErver Express 2005 edition and have which I have installed along with the Northwind database as per the download instructions. My IIS software is version 5.1 which I have checked and it is configured to allow Integrated Windows Authentication. the relevant code is (1) web.config file connection strings 
<connectionStrings>
<add name="NorthwindConnectionString"
connectionString="Data Source=.sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>(2) the grid view control and sqldatasource 
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False"
ReadOnly="True" SortExpression="CategoryID" />
<asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]">
</asp:SqlDataSource>This is the full error message and details: 
Server Error in '/sqlservertest' Application.


Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'. 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: Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'.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): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'JERRY-3C9615BAAASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684883
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +32
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1837
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +129
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1787


Version Information: Microsoft .NET Framework Version:2.0.50215.312; ASP.NET Version:2.0.50215.312  

View 1 Replies View Related

Cannot Open Database Requested In Login 'dbName'. Login Fails. Login Failed For User 'machineNameASPNET'

Jul 27, 2005

Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.

View 9 Replies View Related

Cannot Open Database Requested In Login 'sql'. Login Fails. Login Failed For User 'ASPNET'.

Dec 19, 2003

I am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?

Thanks for any help,

Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.

View 5 Replies View Related

Xp_cmdshell Error In 6.5 For Non SA Login - Error 1326

Mar 17, 2000

I have a stored proc that attempts to execute xp_cmdshell using a login other than 'sa'. The permissions have been given to the login to execute xp_cmdshell and the stored procedure executes perfectly within the query analyzer in EM. However, when attempting to execute the same stored proc in ISQL_W under a login with permissions for everything as dbo (other than Master) I get error 1326 for LogonUser on line 359. This is with the "xp_cmdshell - Use SQLExecutiveCmdExec Account for Non SAs" disabled (as described as a "workaround" on the technet). Microsoft acknowledged this as being a 'bug' to 'fix' and put a 'fix' in Service Pack 5a. The server that is experiencing this problem is running service pack 5. Is there any difference between the service packs and if so, will installing service pack 5a help me? And if not, what can be done to alleviate this problem?

View 1 Replies View Related

Error : Cannot Open User Default Database. Login Failed. Login Failed For User 'server/user'

Nov 22, 2007



i'm using the Enterpirse library logger to write logs into a database.
When choosing connection string i choose the database i want in the "connection properties" dialog box and
push 'Test connection' button.
everything goes well.

then i open the SQL Server Management studio express and connect to the databse to check some things,
from that point on , when i push the 'Test Connection' button in the Enterprise library i get the error:


"cannot open user default database. Login failed. login failed for user My'server/MyuserName'"


even when i close the sql server manager , it is still stuck - the connection test doesn't work anymore....
it only work when i restart the computer.

why ?

View 3 Replies View Related

Using Controls In A Query

Oct 27, 2006

Hi, i'm very new to asp and i have a small question - If i have a control on my webpage, like "CurrentUser" (which is System.Web.UI.WebControls.LoginName), how can i use it in a query? I want a query which will return all records pertaining to the current user. If i was writing the query in normal SQL i would write the following: SELECT Date, JobID, EmployeeIDFROM TblTimeslotWHERE TblEmployee.EmployeeName = (The "CurrentUser" on the webpage) AND TblEmployee.EmployeeID = EmployeeID Thanks very much for your helpBen 

View 1 Replies View Related

Controls Disappear

Feb 12, 2007

Is it not possible to execute one package and then design another package? I am executing one package and trying to design another package and just have a grey window in the control tool box that says:

"there are no usable controls in this group. Drag an item onto this text to add it to the toolbar"

Can I only get my controls by dragging when another package is executing? Where do I drag them from?

Thanks,

Kayda

View 4 Replies View Related

How To Add An Event To CRI Controls

Jan 19, 2007

Hi all,

I am trying to develop a CustomReportItem similar to Matrix control. Is it possible to add some "OnClick" sort of events to a section of this CRI (As a drilldown button of matrix control allows to expand the respective column).

Please help me if there can be any solution.

View 5 Replies View Related

Controls Pushed Off To The Right

Feb 1, 2007

This is pretty weird... any controls past the halfway horizontal point of the report get pushed into page 2. The leftmost control is not affected just those to the right of it. It's like there is an invisible tab after the leftmost control. Smaller (not leftmost controls) (not past the middle of the page) are also pushed way to the right (just not into a new page)

Is there some property (that I'm not aware of) that does this? It doesn't matter if I use textboxes or lines. I have not changed any of the default control properties. flow layout is still LTR.
In my current report I have questions and answers on separate lines...I can't place them next to each other or it screws up the pagination.

I start with a new report and it does not do this but as soon as I add 2-3 vertical pages (over 11' x 2) This starts happening.

Has anyone experienced this?

View 1 Replies View Related

Link Server Error: Login Failed For User 'Domainuser'. (Microsoft SQL Server, Error: 18456)

Oct 18, 2007


Hi,

I am trying to create a linked server between 2 SQL Server 2005 boxes.
When I create the linked server I specify a login for the connection.
The strange part is that I get the following error when it goes to test the connection:

The test connection to the linked server failed
Login failed for user 'Domainuser'. (Microsoft SQL Server, Error: 18456)


I can use the SQL mangement studio to conenct to the database using this same login.
The login has all the server roles assigned to it also.

Can anyone shed some light as to what may be the problem?


Thanks,

View 5 Replies View Related

Combining 3 Datasource Controls With T-sql

Nov 14, 2007

 Hello everyone, I'm trying to get a count of 3 different types on the same field.  For Example, let's use Gender as the field with these options: Male, Female, Not Given.  What I'm wanting to do is retrieve a count for each type.  What I have so far is:  SELECT COUNT(Gender) WHERE Gender = 'Male' and I have to duplicate this in 3 different data controls.  I would like, however, to have one datasource control with a statement along the lines of:       SELECT ( SELECT COUNT(Gender) FROM Users WHERE Gender='Male), SELECT COUNT(Gender) FROM Users WHERE Gender='Female', SELECT COUNT(Gender) WHERE Gender='NotGiven' )       From UsersOr something to that effect.  Any suggestions?Thank you greatly for your help,Mark  

View 2 Replies View Related

User Controls And Sqldatasource

Nov 19, 2007

I created a user control file with 3 properties. I would like to call this user control in a datalist control in the hosting page and pass the properties from a sqldatasource control. To this end I have a code like below;
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"SelectCommand="SELECT [1], [2], [3] FROM [table1]"></asp:SqlDataSource>
<asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1" DataMember="DefaultView" >
<ItemTemplate>
<uc:kk ID="kk1" runat="server" One='<%# Eval("1") %>' Two='<%# Eval("2") %>' Three='<%# Eval("3") %>' /></ItemTemplate></asp:DataList> I don't get any errors when I run the page, however it won't work as I wish. Only thing that appears in the rows of datalist is "01.01.0001 00:00:00".

View 4 Replies View Related

Should I Use Bound Or Unbound Controls ?

Jan 9, 2004

Hello !
i am new to databases so i would be grateful for your help.
I am using SQL Server 2000 and vb to access and update the records of a database.

I want your opinion about the way i am displaying data.
I have created a form with textboxes etc. which display the fields
of the table.
Now when i load the form i populate a recordset with a
"select ... from... " query.

Then i manually
set

txtfield1.text=cstr(recordset.fields("field1").value)

etc...

If i want to update the table then i have to construct manually the
query.

"update ... set field1='"+ txtfield.text +"' "

if i want to move to a next record i do

recordset.movenext
and then
txtfield1.text=cstr(recordset.fields("field1").value)

again
Is that good or should i use bound controls ?

If multiple users access the same form at the same time (from different computers) will they be locked only when they save (update) data ?

Thank you !

View 4 Replies View Related

How To Create Dynamic Controls In Wpf + C#

Nov 5, 2007

Hi,

i want to create dynamic controls using wpf and c#.

can any body send me some code snippet.

for example:-

one of my window page have 100s of fields like textbox, checkbox and date controls in a group inside different grid and panel.

now if admin has made that amoung 100 fields user should be able to see only 20 or 30 fields.

how will i do so, just making the fileds invisible won't work, coz all the fields should be visible from top of the form,

means i want to push all the visible fields at the top.

what are the best way to do so.

need it urgent

thanx a lot


View 3 Replies View Related

Regarding Form Controls In Reporting Sql

Aug 8, 2007

I am doing 350 controls as in a form like in reporting service . Due to so many controls the reporting sql server after deployment the preview and report must be slow. and i will checked the data transmission in stored procedure from sql server it will be faster.I am having doubt in controls in form will be slower.


Is there any suggestions without decrement the controls and to be report will be faster.

View 1 Replies View Related

Problem In The Membership Controls

Jun 3, 2007

sir

i have uploaded my website but there is a problem

It is working very well wneh on the local host

but when uploaded on the web server the login control is not validating the users of the database

also i have added a CAPTCHA control

and that is giving an error that the cobe u entered is not matching

u can even check this error

My Url is http://www.webgrowthengine.com

click on the login button

user name: "aaaa" (Excluding the quotes)

password: !@#$%^& (Press shift+ 1234567)



plzhelp me

Nitin

View 1 Replies View Related

Data Mining Web Controls

May 13, 2007

Hi ... hope you can help.

I would like to use the Data Mining Web Controls which ship with the MSSQL2005 Beta 2. The installer (BetaAnalysisServicesSamples.MSI) is supposed to create a new virtual directory and should also create the DataMiningHTMLViewers.dll according to "ReadMe_Data_Mining_Web_Controls.rtf"

But the MSI only creates a few new directories with the source code and a deployment project (DMHTMLViewersSetup.vdproj) which won't open with VS2003. The solution apears to be for VS2005.

How do I install the Web Controls?

View 3 Replies View Related

Matrix Moving Other Controls

Jun 2, 2006

RS 2005

I have a matrix item in a report. It is only about 7cm in width in design mode but obviously explodes out to about 30cm in when the report is run as thats the way the query behind it works.

The problem is any control e.g. a chart placed above and to the right of the matrix in design mode gets pushed across to the end of the matrix's width when the report is run, which causes extra pages in the report.

Other controls placed directly above the matrix in design mode hold their position when the report is run, it is only those controls placed further right than the end of the matrix (and above the matrix) in design mode that get pushed across. Why is this, is there a way to fix it?

Thanks

N

View 3 Replies View Related

Report And Other Controls Not Rendered

Aug 12, 2007



After resolving all the installation and configuration related issues, I was able to deploy a couple of projects on my report server. I can see alll folders and reports listed inside the folders from http://<servername>/reports . All works fine except when I run a report, the http://<servername>/Reports/Pages/Report.aspx page does not render report.

This page displays View, Properties, History Subscriptions etc, menu items on the top section of the page. It also displays Home, My Subscriptions, Site Settings, Help etc. links on top right corner of the page. I can also see the bar that has "New subscription" button. But the problem starts from the section below that. It does NOT display the Report navigation bottons (like First page button, Next Page button, previous page button, Last page button, print button etc.) Appears that the icons images for these bottons are missing. And above all, the page does not render report.

IE browser status indicate the following error:
error:'HoevrImagectl161_ctl01_ctl01_ctl06_ctl01' is null or not an object.

The report renders fine via http://<servername>/ReportServer/Pages/ReportViewer.aspx


I may not have explained the problem well here however, if you are interested, I can email you the screenshot of Report.aspx to help you understand the problem.


Any help is appreciated!!!

View 6 Replies View Related

Ports Used By ReportViewer Web Controls

Jan 15, 2007

When a ReportViewer control is used to access a report on a remote SQL Server database, on what ports does the communcation occur? Does the control communicate on on the SQL Server ports of 1433 and 1434 or does it communcate as a web service on port 80 (or 443 for HTPPS)?

View 1 Replies View Related

Login Error - Please Help

Apr 5, 2007

I have created a site using a login through the Asp.net Admin Website Tool.  Through numerous tries of trying to get this to work, I am now receiving the following error "Login failed for user 'app1_lakeshore'."  Can anyone help?
Here is my werbconfig file:
 <?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
WindowsMicrosoft.NetFrameworkv2.xConfig
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
<add key="/LMCIntranet" />
</appSettings>
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=sqldev2.aurora.org;Initial Catalog=Lakeshore;Persist Security Info=True;User ID=app1_lakeshore" providerName="System.Data.SqlClient"/>
</connectionStrings>
 
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
 
<authentication mode="Forms" />
<customErrors mode="Off"/>
<compilation debug="true" strict="false" explicit="true"/>
<pages>
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>
 
<system.net>
<mailSettings>
<smtp from="vanessa.edwards@aurora.org">
<network host="localhost" password="" userName="" />
</smtp>
</mailSettings>
</system.net>
</configuration>
 

View 3 Replies View Related

Login Error:

Mar 18, 2008

Whenever i will try to login then page given an error
The data types text and varchar are incompatible in the equal to operator. 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: The data types text and varchar are incompatible in the equal to operator.Source Error:



Line 53:
Line 54: SqlDataReader ReaderApshm;
Line 55: ReaderApshm = SqlComApshm.ExecuteReader();
Line 56: if (ReaderApshm.HasRows)
Line 57: {Source File: e:shoaibwebsitedynamicdotnetSoftwareDefault.aspx.cs    Line: 55 Stack Trace:



[SqlException (0x80131904): The data types text and varchar are incompatible in the equal to operator.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
System.Data.SqlClient.SqlDataReader.get_MetaData() +62
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
System.Data.SqlClient.SqlCommand.ExecuteReader() +84
_Default.LoginButton_Click(Object sender, EventArgs e) in e:shoaibwebsitedynamicdotnetSoftwareDefault.aspx.cs:55
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +86
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746



Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433  
 
Default.aspx.cs:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default : System.Web.UI.Page
{
 
 
//***//***//***
public SqlConnection ConApshm = new SqlConnection();public void DBApshm()
{if (ConApshm.State == ConnectionState.Closed)
{ConApshm.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
ConApshm.Open();
}
}
//***//***//***protected void Page_Load(object sender, EventArgs e)
{
}protected void LoginButton_Click(object sender, EventArgs e)
{
 string UsernameTextBoxValue = UsernameTextBox.Text;
string PasswordTextBoxValue = PasswordTestBox.Text;
//***string QueryApshm = "Select * From Tbl_Members Where Username='" + UsernameTextBoxValue + "' And Password='" + PasswordTextBoxValue + "' ";
//***
//***
DBApshm(); SqlCommand SqlComApshm = new SqlCommand(QueryApshm, ConApshm);
//***
 SqlDataReader ReaderApshm;
ReaderApshm = SqlComApshm.ExecuteReader();if (ReaderApshm.HasRows)
{MsgLabel.Text = "Your login attempt was successful. ";
}
else
{MsgLabel.Text = "Your login attempt was not successful. Please try again." + UsernameTextBoxValue + " " + PasswordTextBoxValue;
}
 
//***
ConApshm.Close();//***
 
}
}
 
 

View 4 Replies View Related

Login Error

Mar 2, 2004

when i display the contents of a MS Access database, it displays fine. but when i use SQL/MSDE database, the contents can by displayed well when i run the aspx locally using webmatrix's local server. but when i access the same aspx file online, i get the following error message:

************* ERROR MESSAGE *************
Server Error in '/' Application.
--------------------------------------------------------------------------------

Login failed for user 'PC-MARVINEASPNET'.
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 'PC-MARVINEASPNET'.

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.
************* ERROR MESSAGE *************

the following is the code:

<%@ Page Language="VB" %>
<%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %>
<script runat="server">

' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server" SelectCommand="SELECT * FROM [Employees]" ConnectionString="server='(local)'; trusted_connection=true; database='Northwind'" UpdateCommand="" DeleteCommand=""></wmx:SqlDataSourceControl>
<wmx:MxDataGrid id="MxDataGrid2" runat="server" DataSourceControlID="SqlDataSourceControl1" BorderColor="#CCCCCC" AllowSorting="True" DataMember="Employees" AllowPaging="True" BackColor="White" CellPadding="3" DataKeyField="EmployeeID" BorderWidth="1px" BorderStyle="None">
<PagerStyle horizontalalign="Center" forecolor="#000066" backcolor="White" mode="NumericPages"></PagerStyle>
<FooterStyle forecolor="#000066" backcolor="White"></FooterStyle>
<SelectedItemStyle font-bold="True" forecolor="White" backcolor="#669999"></SelectedItemStyle>
<ItemStyle forecolor="#000066"></ItemStyle>
<HeaderStyle font-bold="True" forecolor="White" backcolor="#006699"></HeaderStyle>
</wmx:MxDataGrid>
</p>
<!-- Insert content here -->
</form>
</body>
</html>




do i need to insert some code to do this properly? obviously running the aspx file to display the SQL/MSDE database contents locally works perfectly. i have a webserver setup at home. but when another computer tries to access that file online, i get the error message shown above.

regards,
marvine

View 1 Replies View Related

Login Error

Jul 30, 2005

Hi, I had a problem with the login function. The login function is
supposed to authenicate the user email and password and if the both of
them tally with each other, they can then be let into the other pages.
But for my codes, the error is that even if the password and email does
not tally, it can still procceed. Can someone pls help? Thanks! :)

ALTER PROCEDURE spLogin(@MemEmail nvarchar(80), @MemPwd VARCHAR(15))
AS

BEGIN
IF NOT EXISTS
    (SELECT MemEmail
    FROM DasMember
    WHERE MemPwd = @MemPwd)
    RETURN -600

IF NOT EXISTS
    (SELECT MemPwd
    FROM DasMember
    WHERE MemEmail = @MemEmail)
    RETURN -601

END
SELECT MemEmail, MemPwd
FROM DasMember
WHERE (MemPwd = @MemPwd) and (MemEmail = @MemEmail)

IF @@ERROR <> 0
    RETURN @@ERROR

RETURN

DECLARE @status int
EXEC @status = spLogin 'jane@yahoo.com.sg', 'jane'
SELECT 'Status' = @status

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved