DataSource Controls :: SQL Server Authenticate Fail?
Jan 23, 2010
I want to login my SQL Server by using SQL Server Authenticate but this i fail to do thatI have already configurate "sa" account and change to "windows and sql server authenticate" still not workingCan someone tell me or show me the tutorial how to properly configurate to using "sa" to login by "SQL Server Authenticate"?
View 3 Replies
Similar Messages:
Mar 31, 2011
I am a newbie on a LDAP, now we want to re-deploy a web application that will validate user name and password with AD in a login.aspx
I had success to check the user and password in VS 2008, but when I publish to server it don't work, (they can login even wrong username and password) I had enable the anonymous access and intergrated windows authentication on IIS. we using authentication mode = windows in our web.config
using something like the following to check the AD account
System.DirectoryServices.DirectoryEntry entry = null;
bool isOpened = false;
bool isSuccess = false;
try
{
string dom = System.Configuration.ConfigurationManager.AppSettings["domain"];
entry =
new System.DirectoryServices.DirectoryEntry("WinNT://" + dom, tb_username.Text.Trim(), tb_password.Text.Trim());
isOpened = true;
Object obj = entry.NativeObject;
but still no luck on IIS server. Would you mind to give me a hand to solve this issue, I had google for a week and still can't solve :(
View 3 Replies
Mar 16, 2010
ive an access database with a table, in this table there is only one data column and one counter column (id, pet) i want to draw random a record. Reading on the web i came with this SQL solution: "SELECT TOP 1 tab_pets.pet FROM tab_pets ORDER BY Rnd(id)" and it works perfectly.
The problem is while using this statement in my code behind (in a class) as it draw always the same record, hence generates the same random each time. I though that the access Rnd() function would be handled by the access driver and not by my application, how can i resolve this?
View 4 Replies
Mar 2, 2010
I open a sqlconnection and sqlcommand. I execute a stored procedure and get the scope_identity from that procedure to be used within another procedure that needs to be fired. Unfortuntley if the second procedure fails forwhatever reason the data change for the first procedure commits anyway. I kind of want to do a began transaction end transaction on the c#.net side. Also I need to execute a stored procedure multiple times....
View 2 Replies
Dec 14, 2010
I have a website I'm trying to catch up to speed on. It is throwing a null exception when the code tries to assign a variable pulled from a SqlDataSource query. The query is below:
[code]....
I want to know if there is a way to test the connection to the remote IP Address perhaps through some debugging tools and as a general question how would the web app authenticate against the remote database? I just see the connection string but no user name etc.
View 5 Replies
Mar 11, 2010
I created a simple search form which populates a gridview from sql server. I use 'contains' on a varchar(max) field which has a full text index. I find if I do a search for "Mexico Argentina", I get multiple results, which is good.One thing my sql server stored procedure is doing is inserting the word 'AND' between words. I do this because I want all words to be found. So if the user inputs "Mexico Argentina", I am converting that to "Mexico AND Argentina"But if I have even one 'noise word' in the search string, I get no results at all. For instance, there might be a sentence in my database table saying "I prefer Mexico to Argentina" but if I put that sentence in, I get no results at all. The database is seeing my converted string:I AND prefer AND Mexico AND to AND ArgentinaAnd finds nothing.I also have another form, which does a more advanced search that allows 'exact phrase'. If the user chooses 'exact phrase', then I don't insert AND anywhere. Instead, I surround his phrase with 4 apostrophes - 2 before the phrase, and 2 after.So now the database sees:' ' I prefer Mexico to Argentina ' ' (I've put a space between apostrophes here to make it clearer to view.Now I not only get no results, I get an error message.
View 1 Replies
Feb 25, 2010
Im trying to take the example from this website http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/sql-server-2008-proximity-search-with-th and make it work on my site. Its this part im having troubles with
[Code]...
here is my code from my function that doesnt work.
[Code]...
Any suggestions on how to get it to work? it fails at rdr = cmd.ExecuteReader(); im also worried it will also fail at ZipCodes.Add(rdr["h.*"].ToString());
View 2 Replies
Aug 3, 2010
I am trying to stop the data flow when certain conditions happen in the script component. Like if a row in the data set has an invalid date, I dont want that dataset to be inserted in the tables or go through OLEDB Destination, rather I want the entire data flow for that dataset to stop and go back to the control flow page.
I have tried mulitple solutions but nothing worked. Conditional Split ends up inserting the correct rows, but I just dont want anyting to be inserted when one row is bad, where as I do want the entire dataset to be inserted if all rows are good.
How can I fail the component when certain conditions happen int eh script component.
View 1 Replies
Apr 3, 2010
Not sure if this is the correct section to ask this but this is regarding storing datatype problem.im trying to convert an image file retrieve from a folder and convert it to Byte so that i can save into database
In below function i retrieve and convert the image from a folder to byte
[Code]....
Then i set ImageUrl in PageLoad
[Code]....
My image datatype in database is image
View 1 Replies
Nov 9, 2010
I've recently developed a web user control that lists a series of reports. When the user clicks on the report it serves back a CSV file download in the response stream using the following code:
Response.Clear();
Response.ContentType = "text/CSV";
Response.CacheControl = "no-cache"; [code].....
The code initially worked fine in all browsers. Then the client put a requirement to use SSL for the site. As part of this I introduced a global handler to update the protocol from HTTP to HTTPS for all requests as follows:
protected void Application_BeginRequest(Object sender, EventArgs e)
{
string requestURL = Request.Url.ToString().ToLower();[code]....
However, since securing the site using SSL the CSV file downloads no longer work for IE although they do continue to work for Firefox / Chrome / Safari.
Is there something I am missing in the headers that is unique to IE in order for the file response to work correctly?
The message I receive from IE is:
"Internet Explorer cannot download
Reports.aspx from .... in ......
Internet Explorer was unable to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
UPDATE:
Here is some example fiddler output coming back from the page request which looks like it's serving correctly. Why doesn't IE understand that it's just been served a file?
HTTP/1.1 200 OK
Date: Tue, 09 Nov 2010 14:23:50 GMT
Server: Microsoft-IIS/6.0[code].....
View 3 Replies
Mar 2, 2011
we save the images in database and read the file to show on web front. The problem is some of the images fails to be shown on the page. but if we right click and choose show image, it is shown again. is it because of database timeout ?
View 3 Replies
Feb 8, 2011
I currently have an odd problem with ASP.Net authentication. Consider the two following lines:
MembershipCreateStatus ct = new MembershipCreateStatus();
Membership.CreateUser("admin", "mypassword", "test@gmail.com", "1", "1", true, out ct);
This does register my user in my database. I have verified this.However, when I run this immediately after:
FormsAuthentication.Authenticate("admin", "mypassword");
The authentication fails. The weird thing is I know for a fact that the user does exist in the db, and that is further confirmed if i run
MembershipUserCollection uc = Membership.FindUsersByName("admin");
and uc does hold my admin user withe all the proper info. why Authenticate would return false?
View 1 Replies
Mar 25, 2011
I'm new to asp.net and SQL Server and I'm trying to research and implement a good way to authenticate a user using those technologies. Would you have any advice as to best approach this? I've read some of hashing but I couldn't find a good tutorial or website describing the best way to approach that
View 3 Replies
Jan 14, 2011
This program used to work when I had VWD 2005 express and SQLSERVER 2005 express. Then we upgraded to VWD 2008 express and SQLSERVER 2008 express. Now it fails Error running adodb Provider cannot be found. It may not be properly installed. 3706 To clarify; I used to run variations of the following to create small offline cub files that I could email to remote Users:-
PROVIDER=MSOLAP;
DATASOURCE=C:TESTAMRunAdodbTestMyCube.CUB;
SOURCE_DSN=AMCubeData;
CREATECUBE=CREATE CUBE AMCubeData(
DIMENSION [Channels],
LEVEL [ALL Channels] TYPE ALL,
LEVEL [Channel Group Name],
LEVEL [Channelname],
MEASURE [Sales Val]
Function Sum
Format 'Standard');
INSERTINTO=INSERT INTO AMCubeData(
[Channels].[Channel Group Name],
[Channels].[Channelname],
MEASURES.[Sales Val])
SELECT [ChannelGroupName] AS Col1,
[channelname] AS Col2,
[Sales Val] AS Col23
FROM dbo_qryCubeDataExtra
;
in a VB6 program that ran them in a ADODB connection something like :-
Dim MyCnn As ADODB.Connection
On Error GoTo Err_ErrorHappened
Set MyCnn = New ADODB.Connection
MyCnn.Open (MyAdodbcmd)
View 7 Replies
Jan 7, 2010
i want to send an email using authenticate smtp server with port number(For Example SMTP Server is :
192.168.0.8 and port : 587).
i got lots of example but failed to find smtp server with port number using authentication.
View 4 Replies
Jul 26, 2010
There is one page which is actually a streaming to The Axis IP camera which spits MJPEG output.It requires user to log in with the user name/password promp on browser .I am using this stream to show video directly on a web page.It shows video correctly but asks user to provide correct user name and password set for the camera,I tried to logging in to this camera on server side using HTTP requests and then I realized I authenticated server request not the browser the end user is using.
So what I want is a method server side or client side, that can allow me to log-in to camera automatically when my end-users visit this page.I am using asp.net with c# 2005
View 1 Replies
Sep 30, 2010
My masterpage has a loginStatus control to let users log out and it works very well on normal pages .Recently, I created a new content page associated with the mentioned master page. Such new page allows users to add textboxes dynamically through ajax asycpostback.
Unfortunately, loginstatus right now fails to work when i click it. I traced the process and i found out that the loggingout event was not fired when i click it.
I follow this video to make such "Dynamically add control" page.
http://www.asp.net/ajax/videos/how-to-dynamically-add-controls-to-a-web-page
View 2 Replies
Oct 25, 2010
I started the Bakery site demo...everything runs fine on my local machine.When I publish the site to production server in w2k8r2+iis7.5 and with .net 4.0 (integrate) pool, my bakery apps not able to connect to the .sdf file.
Error I got is :
Connection string "bakery" was not found. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidOperationException: Connection string "bakery" was not found.
Source Error:
Line 2: Layout = "_SiteLayout.cshtml";
Line 3:
Line 4: FacebookSocialPlugins.Initialize("[xxx]", "[xxx]","bakery");
Line 5:
Line 6: }
Stack Trace:
[InvalidOperationException: Connection string "bakery" was not found.]
WebMatrix.Data.Database.OpenNamedConnection(String name, IConfigurationManager configurationManager) +132
WebMatrix.Data.Database.Open(String name) +42
System.Web.WebPages.DatabaseConnectionInfo.Connect() +43
System.Web.WebPages.SimpleMembershipProvider.CreateTablesIfNeeded() +42
System.Web.WebPages.WebSecurity.InitializeMembershipProvider(SimpleMembershipProvider sMembership, DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean createTables) +70
System.Web.WebPages.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
System.Web.WebPages.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +52
FacebookSocialPlugins.InitializeMembershipProviderIfNeeded() +54
FacebookSocialPlugins.Initialize(String appId, String appSecret, String membershipDbName) +171
ASP._PageStart_cshtml.Execute() in d:xxxakery\_PageStart.cshtml:4
System.Web.WebPages.StartPage.ExecutePageHierarchy() +15
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +33
System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContext context) +207
View 2 Replies
Apr 15, 2010
How to insert data from local SQL server to remote SQL server (without using linked server) like below?
insert * into [remote server].[northwind].orders
from [local server].[northwind].orders
View 4 Replies
Feb 14, 2011
I want to create a link button with following code. However, this linkbutton doesnt work correctly: when I clicked it, it cannot go to the target url and will cause an exception.
<asp:LinkButton PostBackUrl='LearnPage.aspx?cid=<%#Eval("cid") %>' runat="server"><%# Eval("cname")%></asp:LinkButton>
(The linkbutton is one column of a grid view)
Debugging the code, I found that the value of cid is not parsed to the url. Actually, this code <%#Eval("cid") %> is not recognized as a variable, the target url appears to be LearnPage.aspx?cid=<%# Eval("cid") %> instead of LearnPage.aspx?cid=VALUE.
View 1 Replies
Feb 9, 2010
I have to programmatically import a table from a database "A" in Sql Server 2000 to a database "B" in another server 2005.
View 1 Replies
Nov 16, 2010
I have a gridview in which I have the autopaging option set to true, when i load the grid everything works on the first page, i can even go to second page , but when i click the edit button nothing happens and after that any click blows up the page giving me error Faile to load view state.
View 5 Replies
Nov 15, 2010
i am trying to create connection using OLEDB connection in my app. but i am not able to create the connection as in datasource i want to use Server.mappath, but cudn't find the right method to use it. i am trying to make connection with Access database file. following is code i have tried:
string path = Server.MapPath("~/uploadaccess/Production.mdb");
string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("~/uploadaccess/Production.mdb")&";";
and also
OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & path&";");
and tried this
OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("~/uploadaccess/Production.mdb"));
and this is the error i am getting:
Operator '&' cannot be applied to operands of type 'string' and 'string'
View 3 Replies
Nov 5, 2010
Edit and Delete functionality works flawlessly in Gridview if all data is pulled ONLY FROM ONE TABLE. But pulling data from one table give you ID's instead of actual values that are stored in other tables.
After creating a usable Select statement that would pull all the correct values, my Edit and Delete functionality no longer work.
Here is code.
[Code]....
View 2 Replies
Sep 24, 2010
I dont know where to start, but I have a simple issue that you may be able to resolve.
I have a SQL database that contains a table with user name / password / Account level in it.
What I am trying to do is to create a Login page that will use this database and table to authenticate the login.
I have spent some time looking about for an example, and the nearest that I have found is for an access Database, but I really need this to work with SQL.
View 2 Replies