|
Have you tried just using Session variables? You could go the cookies route but make sure the password is not in plain text and the cookie is set to expire with in a short time later. Say like 20 minutes or one hour... Just a quick thought...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
No
I have never used session variables, not really done anythin like this thats why I asked was gettin millions of different things off the web.
All my passwords have been encrpted anyways , sot ahts not a problem
|
|
|
|
|
Session["SomeVariable"] = someVariableIuse;
Use session variables to store information like that about the current user. Just note that you have to cast the objects back out of the Session object
string MySessionVariable = (string)Session["SomeVariable"];
Darroll
|
|
|
|
|
boyindie wrote: All my passwords have been encrpted anyways , sot ahts not a problem
That is fine. You can store it in session variables. Just take a look at Darrol's example.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
hi friends,
how to upload and download a file from database using upload control in asp.net2.0.
|
|
|
|
|
Where is the database ? If it's on the server, the web is full of examples for storing files in a database.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
So did you make it to OK in one piece?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Are you trying to store a file in the database and have the ability to pull it out when needed? If so, there is a lot of examples out there on the web. I only know how to do so in PHP but the concept is similar.
You will need to load in the file into something like a memory stream, and send to the database as a blob-type...
Hope this is a start for you...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Please read the forum guidelines. Make your message titles meaningful. Do not use 'please help' or 'urgent' and do not use text speak.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
|
hi friends ,
how to create a dll file in asp.net2.0.
|
|
|
|
|
you cannot create dll in asp.net instead of you can use Class Libary option on opening new project.
|
|
|
|
|
A class library is a DLL.
Darroll
|
|
|
|
|
I want to delete some files from my application. For this I am using System.IO.File.Delete. It gives me error "Access to Path 'C:\EmployeeData\EmployeeJun.htm' is denied."
I did find some articles explaining that account should have privileges to the path or file. I verified that ASPNET account had read and write permission to the folder and to the file (inherited permission from parent). Any idea what is missing here.
In addition, I have web service in application that can delete the same file from within the application. In case account is missing permissions to the file, how File.Delete can delete the same file from web service? Please explain.
Thanks in advance.
|
|
|
|
|
Your ASP.NET application cannot access files above the application root. This is by design.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thank you for reply.
File is not above the application root but under application root.
Like I stated before, I can delete the file from the web service running on the server (personal web server here) and invoked from the application.
File (also created from the application) has Read, Write and Read & Execute permissions already. I just tried giving Modify permission to the file and delete it from aspx page. It worked.
I am confused!!
Kubben, what for is IIS_WPG account?
|
|
|
|
|
IIS_WPG is the iis worker process group. Any user or identity that you are trying to use to be the indentity of the application pool also need to be in the IIS_WPG group. Thinking about it aspnet user would already be in this group. Still the identity of your app pool it probably network service. That group most likely doesn't have rights to delete the file.
Ben
|
|
|
|
|
If the aspnet user has access you also need to give IIS_WPG access, then it should work.
Ben
|
|
|
|
|
Hi,
I tried to add user into Active directory using ASP.Net and C# web application. If i tried to add it in "Users" then it successfully added and I can also change that user password.
But if I want to add that user into another "Organizantional Unit" then It add it successfully but create a problem at "SetPassword" method. Web application gives timeout problem. When i tried it in Window application then one popup box is opened. It display me that I am accessing private data.
How can i update private data of Active directory? I used Directory Entry for that. How can i change user's password which is in User defined Organizational unit?
Please Help....
Regards,
Hardik Patel
Analyst Programmer
|
|
|
|
|
Hope this helps:
public void CreateUserAccountAd()
{
string userID= "CN=userID";
string pass= "password";
// Use this command to add it into other OUs
//string lPath=
// "LDAP://domain/OU=OrganizationalUnit,DC=DomainName,DC=com";
//Use this one to add in default OU
string strpath =
"LDAP://domain/";
DirectoryEntry de = new DirectoryEntry(lPath);
DirectoryEntries child = de.Children;
DirectoryEntry deuser = child.Add(userID,"user");
deuser.Properties["SAMAccountName"].Add(userID);
deuser.CommitChanges();
SetPassword(deuser, pass);
Enable(deuser);
}
private static void SetPassword(DirectoryEntry DE, string password) {
object[] oPassword = new object[] {password};
object ret = DE.Invoke("SetPassword", oPassword );
DE.CommitChanges();
}
public void Enable(DirectoryEntry DE)
{
ActiveDs.IADsUser user1 = (ActiveDs.IADsUser)
DE.NativeObject;
user1.AccountDisabled = false;
DE.CommitChanges();
}
|
|
|
|
|
Hi
I want to get the ip of the machine using a web application.
I used Request.UserHostAddress() and Context.Request.ServerVariables ["REMOTE_ADDR"] but still gives me IP Address: 127.0.0.1
Any ideas?
Could it be a configuration from our network administrator?
|
|
|
|
|
When you are viewing a web page that is hosted on your own computer, you are browsing from localhost to localhost, so the IP address 127.0.0.1 is correct.
---
single minded; short sighted; long gone;
|
|
|
|
|
That is correct. The reason is that iam using an application hosted on my Laptop
Try to put the ip instead of localhost u will get the ip right.
thanks for ur response.
|
|
|
|
|
Hello Everybody...
I have a web application developed in .net 2.0 which uses SQL Server 2005 as its backend.
No error is thrown when I jus debug from my machine.
But When I host it in IIS it is throwing the error mentioned in subject line.
My connenction string in web.config file just has, server, database attributes along with integrated security is set to true...
And the SQL Server is in Mixed Mode authentication.
Still I face the error.
PS: I could successfully browse the site if i mention some SQL Authenticated User id and password in connection string instead of integrated security...
Is there anyother way without giving the sql userid?
Why do we have to have the sql authenticated user?
-Saran
|
|
|
|
|
If you use authenticated security in a .net application then then connection will be made in the context of the process account IUSR_MachineName most probably. It is unlikely that user has access to the sql server and I wouldnt recommend that you add it.
I would suggest using a sql login from the web site rather than integrated authenication.
|
|
|
|