Can't Login Remotely Even Though Membership Data Is Present
Dec 18, 2006
(Sorry this was posted to VWD2005 Express by mistake)
I have created a simple project using ASP.NET 2.0 which enables a user to login. I created the login user using the Web Administration Tool in Visual Studio 2005.
I created everything locally and it worked.
Locally I have 2 databases. One containing normal data (which my site uses to populate a GridView control) and the other being ASPNETDB.MDF - which contains membership (login user) data. These 2 databases sit in the App_Data folder which is in the root of the project.
I have a remote database which is hosted in a shared environment.
This is just the one database and it appears to have all tables in the one database (membership tables and normal tables - such as the one I use to populate my GridView control).
I uploaded the website and using the Database Publishing Wizard I uploaded the database data to the shared host. I also changed the connection string to point to my remote database.
If I visit the website the GridView is populating correctly (pulling data from the remote database) but when I try to login it crashes. The error is "Access denied creating App_Data sub directory".
The membership login details for the user I created are in the remote database as I have compared the data in it to the data in my ASPNETDB.MDF local database.
If I launch from within Visual Studio 2005 then it allows me to login perfectly well.
Please does anybody know why it won't let me login when I access it via the website?
I have a two problems. First is connecting to my sql server 2005 express with my sql account. Every time i try to configure data source to connect to my db on server using my windows auth. it works and when i try using my sql account i get error, User is not associated with a secure SQL Server connection. Second, how can i configure my application to store membership, roles, user data in a database on my server like /Servername/SQLEPRESS/mydbname and not to App_Data/ASPNETDB. Tnx in adv.
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.
We have succesfully moved SQL server to a new machine and this same machine will also be running IIS 5.1 to host our intranet. We will be doing the actual developing on other machines and publishing the site to the new machine. Now, when I went to test the site, it all comes up just fine, but logging in is a problem. What do I need to do to configure the new SQL server to accept new members, logins, etc. Oh, and actually membership is still on the "old" SQL. When I tried to login, I get this:
Server Error in '/' Application.
Login failed for user ''. The user is not associated with a trusted SQL Server connection. Thanks for the information.
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.
Since today (after installing the latest Windows Updates !on my local machine!) I cannot login to a SQLExpress instance remotely; stating that it cannot find the server/instance.
The weird thing is: it only happens when I want to login to the non-default instance (sqlexpress 2005) (<IP><instance>).
When i'm using the default instance (msde 2000 or sqlexpress 2005 on another machine) (<IP>) it seems to work fine.
Does this have something to do with the windows updates, or is it just a coincedence?
I can access the report server remotely. However, when I try to access via browser locally, no luck. I get access denied.
Some kind of browser diff maybe?
I noticed that on the browsers/machines that work, I have the option of putting the domain in seperately. The browser that doesnt work (on the same machine as the db server and web site) puts the domain in front of the username for me.
Hello. I have been challanged to build an application that keeps track of inventory and dates of every item that needs inspection on regular intervals. The original application was a .NET windows application and i have been tasked to "port" and improve it to a .NET C# web application. The original database was in access and i have imported everyting to SQL and all the data is in a single table. So far the table is relatively small so i decided to keep the current database design. What i need to do is to select all the items that are comming up for inspection in the comming months and present them. Each item has a uniqe article number (artnr) with the item name, category and location of the item. The location is the part i would like each items to be presented by. Basicly i would like to retrive artnr, name, type and present x number of gridviews or a sorted presentation where each item is shown inside each gw/whatever by location. I also considered moving all locations to it's own table and connect it with a PK/FK to the prinmary article table but i dont know if this will help me or not. Basicly i have no idea how i would present the items by location where each gridview/somethign else is it's own location. I could really use som help with how i can retrive and present the data so it is showed in the above manner.
I created a membership database on my local computer. DB is SQL Server 2005. I created create sripts for that database and created this database in a SQL Server 2000 instance on another box.As soon as I changed my web.config file to point to the new database, I got this error below. What is causing it?The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.Do I have to create a local Membership database in a SQL 2000 instance, script it out and then create in the other box?Thanks
hi can anyone help me out, i have one issue that is how i have to check while adding new user details to database table weather that user name is exist in that table or not. for my application i'm using oracle database and C#.Net. table is g_users and columns are: Name Null? Type ----------------------------------------- -------- ---------------------------- USERID NOT NULL VARCHAR2(5) NAME VARCHAR2(20) EMPID VARCHAR2(5) USERNAME NOT NULL VARCHAR2(30) MOBILE NUMBER(12) EMAILID VARCHAR2(20) DOMAIN NOT NULL VARCHAR2(30) i need to check from c# programming before inserting a new row into table weather username is already exists are not. how to check this one?
I'm writing my first .net app in VB.net. I can connect to my database, but get the following error when I try to set a label value. (My code is listed below) What am I missing? Exception Details: System.InvalidOperationException: Invalid attempt to read when no data is present.Source Error:
Line 19: Line 20: reader = comm.ExecuteReader() Line 21: EmployeesLabel.Text = reader.Item("tkinit") Line 22: Line 23: reader.Close() <%@ Page Language="VB" %> <%@ Import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.Configuration" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Dim conn As SqlConnectionDim comm As SqlCommand Dim reader As SqlDataReaderDim connectionString As String = ConfigurationManager.ConnectionStrings("IntegratedDataConnectionString").ConnectionString conn = New SqlConnection(connectionString) comm = New SqlCommand("Select top 1 tkinit from tEliteTimeKeep", conn) conn.Open()
My query actually returns rows but when I run, I get this error "Invalid attempt to read when no data is present". It says that the datareader does not return any rows. Please help. Thanks in advance Sangita
I have a stored procedure that inserts a record, and then either returns an error or, when successful, returns the entire row. This is a method I use on sites I have developed in other languages when inserting or updating data; I am new to c#.
With C# I have a datareader executing the sp, and the insert works fine, however I get the error "Invalid attempt to read when no data is present." when I try to read the data that should be coming back. I have researched and updated my code so that I no longer get the error, but I still cannot get the data back. I trap the sp in profiler, ran it in anaylzer, and it works fine - data is returned. But in the code, it does not see the data.
I have modified the return results so now I just have the ID coming back and that works fine. But I would rather just return the entire row. Can this be done, and if so, how?
Could somebody please help me to stop sending scheduled report when no data is present in the report? Actually I have a daily report which is sent to the client and in a week, two or three days, data will not be there and thus it delivers blank report to the client.
So how can I stop sending blank mails to the client?
Greetings All, I need to export/import the ASP.NET Membership data which is installed in my database via aspnet_regsql.exe. Does anyone have the Cliff notes on how to do this?
I am getting this error even though there should be data present. When I test the SQL statement in query analyzer, it returns 1 row. <%@ Import Namespace="System.Data.SqlClient" %><%@ Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Blog" %> <script runat="server">Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Dim strConnection As String = System.Configuration.ConfigurationManager.ConnectionStrings("currentConnection").ToString 'currentConnection is defined in web.config and works when used in other pages on the siteDim dbConn As SqlConnection = New SqlConnection(strConnection) dbConn.Open() Dim strSelectCommandFirstEntry As String = "SELECT MAX(blogEntryId) as maxID FROM site_Blog"Dim cmdFirstEntry As SqlCommand = New SqlCommand(strSelectCommandFirstEntry, dbConn)Dim rdrFirstEntryData As SqlDataReader = cmdFirstEntry.ExecuteReader()Dim strFirstEntryData As Int32 = rdrFirstEntryData(0) 'error occurs here, i have also tried rdrFirstEntryData("maxID") with same errorrdrFirstEntryData.Close()dbConn.Close() </script> When debugging this code and stopping on this line: Dim strFirstEntryData As Int32 = rdrFirstEntryData(0) rdrFirstEntryData has the following values:hasRows = True, FieldCount=1, Item=In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. and when i click the refresh button...Item = Overload resolution failed because no accessible 'Item' accepts this number of arguments. I suspect that the note for "Item" is my clue to the source of the problem, but I don't know what it means. Please, help.
I'm trying to determine if the record is NULL/empty or is valid from the datareader.
objReader = strCMD.ExecuteReader objReader.Read() if objReader.IsDBNull(0) = true then...
If NULL/Empty, display no records found. If records are found, display "1 or more records have been found". I keep getting the error "Invalid attempt to read when no data is present". I'm not sure what I am doing wrong here.
Was reported to me that reports were running but data was not being displayed. After checknig the Config manager I found that if I went to the reportserver url then clicked on a report it would diplay he correct data. But when trying it on the normal website it would not display anything.
Hi there I have a dataset based on a view (the view contains an union all select). In the Data-Tab in BIDS i can execute the query, set all parameters and get the desired results. In the report though, I am getting no values.
My year-parameters are used as row-descriptions and based on that I calculate the year-values in the data region. I don't know what the problem is... should I post the rdl-file?
create table #datatable (id int, name varchar(100), email varchar(10), phone varchar(10), cellphone varchar(10), none varchar(10) ); insert into #datatable exec ('select * from datatable where id = 1') select * from #datatable
I still want to retrieve the data and present it in the software's presentation layer but I still want to remove the temp table in order to reduce performance issue etc.
If I paste the code DROP
TABLE #datatable after insert into #datatable exec ('select * from datatable where id = 1')
Does it gonna work to present the data in the presentation layer after removing the temp table?
The goal is to retrieve the data from a stored procedure and present it in the software's presentation layer and I still need to remove the temptable after using it because I will use the SP many time in production phase.
I have a requirement wherein PDF files are being rendered from an .rdl (report definition language), through the use of a SSRS scheduler automatically. The generated PDF file is further emailed to a mailing list, through the same scheduler. However, there are situations where the PDF is generated as an empty file (under certain specified circumstances) [through the automatic scheduler run]. In this situation, it is required not to email the PDF at all. I would appreciate an input which lets me know how to prevent the generation of the PDF file, when there are no records in the dataset that binds to the .rdl.Alternatively, is there any indicator via which the scheduler can be alerted NOT to pick up files 0 KB in size?
In my site, when a user registers, I need to create rows in additional tables besides aspnet_Users. So, I need to be able to pass the generated userId guid to subsequent SqlCommands. I'm having a terrible time with this. What's the correct way to set up a SqlParameter so that it will accept a guid? I keep getting this error: "Conversion failed when converting from a character string to uniqueidentifier." I've tried creating the parameter both with and without a SqlDbType. cmd.Parameters.AddWithValue(paramName, guid); and SqlParameter p = new SqlParameter(paramName);p.SqlDbType = SqlDbType.Guid;cmd.Parameters.Add(p); and I get the same error either way. Driving me nuts! Any help appreciated.
I am fairly new to SQL 2005 and Reporting Services.
We are trying to create a report that will display sales data based on group membership from Active Directory.
For example, if USER1 logs in and looks at a Year to Date Sales report, it will only show data that pertains to his group. If USER2 logs in and accesses the same report, it will display different Year to Date information because he is in a different group.
Background Information: We are running SQL 2005 Enterprise Edition Service Pack 2 with Analysis and Reporting Services. We are delivering the reports through a Sharepoint site.
Please let me know if anyone has a good way to tackle this.
I have a need to do a quick and dirty import of a flat file into a 2005 database. When I try to run the Import Export wizard from my machine, I get an error when it tries to connect to the database server. It's the lovely generic error that says my server doesn't allow remote connections. Well it does allow remote connections. I can RDP to the server and run the same import and it works. So why doesn't it work when I try to run it from my machine? Am I missing a setting somewhere?
I am using SQL Native client trying to connect to a named instance of sql (2005, sp2) as my destination.
I have the membership stuff up and running. I've added a field to the membership table called custnmbr. Once a user logs in, I want store his custnbmr in the session and use that to lookup data in another db. ie: Joe logs in and his custnumbr is 001, he goes to the login success page and sees his list of service calls which is: select top 10 * from svc00200 where custnmbr = 001 (the membership.custnmbr for the logged in user) I know how to do this in old ASP using session variables....but I have no idea where to even start with .Net. Many thanks
I have an excel sheet containing one column (ID_NO) with 400K rows. I have a database from where I have to fetch some other columns from a Netezza database. Initially I tried hardcoding all the 400K rows in the query that I wrote using filter WHERE ID IN ('1212','2334'). But after pasting all the 400K rows the query is running indefinitely.
I have imported all the ID in a SQL table (MY_LIST table). I used a DFT, and selected ODBC source, and selected my netezza server. Then in the 'Data access mode' I selected the SQL command from the dropdown.I pasted the same query that I wrote in Netezza. Is there any way to pull only for those records that I have pulled in my SQL table (MY_LIST) ?
I am trying to create and later read a data file from a package deployed in SSISDB, but it is not reading it while it is successfully creating the file. The same package when run from the file system package, runs successfully. Generating ispac and deploying in SSISDB is running for infinite time. Is it a permission issue?
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()
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.