|
Hello everyone,
I am facing this problem lately, I will explain. I have this asp.net 2.0 application which needs to access data from the WindowsPrincipal user over an intranet. This is usually as easy as Dim name as string = HttpContext.Current.User.Name . Thing is, in the environment where the application is working, all computers have had the "Enable Windows Integrated Authentication" disabled.
So my question is, is there any way that I can access Windows/Active Directory user information without using Windows Integrated Authenticaton?
Thank you !
Kazz
"Users are there to click on things, not think. Let the archs do the damn thinking."
|
|
|
|
|
Hello everybody
I have created a Web application to show report in crystal report viewer.
I deployed it on server. when I click on export button in crystalreport viewer then it exports to excel successfully. But when I Export to excel on server it comes out from application.
What's wrong .
Can anybody help me ? Pls
Thanks and regards
Raghav
Raghvendra Kumar Roy
|
|
|
|
|
Raghvendra Kumar Roy wrote: it comes out from application.
What do you mean?
|
|
|
|
|
We are thinking about implementing a Reverse proxy setup on our network with our asp.net application so that another company can access our app through our DMZ. Right now we are using AD to authenicate our users internally.
In order to implement this from a coding stand point what needs to be done?
Our address for the app is using http://servername since its internal do I need to have a registered domain name now if we go with Reverse Proxy?
Once an external user hits our app and they are in our AD tree, what options do I have for logging them in? I would think that they would be prompted for a login and password if not recognized by IIS?
How can I set it up that the external user doesn't have to be bothered with a login, if possible?
What would be the quick and dirty way of getting these external users logged into app?
DNM
|
|
|
|
|
I'm using a custom web control, but every time I compile, the code behind class seems to lose the control. If I type 'this.', the Intellisense brings up the member, and if I try to declare it I get told it is already declared. I'm sure this is some king of caching problem, but nothing I try seems to work.
|
|
|
|
|
Brady Kelly wrote: I'm using a custom web control, but every time I compile, the code behind class seems to lose the control.
I don't understand the problem... How does it "seem" to "lose" the control?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It tells me that the form does not contain a declaration for the control. I then remove the control, compile, and add the control again, compile, and it sees it, until I break the build somewhere else, then when I try and compile again, it tells me it's not declared.
|
|
|
|
|
Hello,
I developed a small application in Asp.Net to send a mail...
i wrote
SmtpMail.SmtpServer = "localhost";
when am trying to send a mail my program is executing and i am getting result your mail sent successfully...
But the mail is not sending,...
Mainly my problem is,What i have to use smtpserver.....
This is the code am writing totally
MailMessage objEmail = new MailMessage();
objEmail.To = txtTo.Text;
objEmail.From = txtFrom.Text;
objEmail.Subject = "Test";
objEmail.Body = txtName.Text + ", " +txtComments.Text;
objEmail.Priority = MailPriority.High;
objEmail.BodyFormat = MailFormat.Html;
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(objEmail);
Response.Write("Your Email has been sent sucessfully - Thank You");
Pinna
|
|
|
|
|
Do you have SMTP server running on "localhost" ?
|
|
|
|
|
Hi,
An SMTP server is a computer that receives outgoing mail messages from users and routes them to their intended recipients. So I would like to know whether the mechine that you are working now, does it fall to this category? If not find out the mail server IP Address/Name and use it instead.
Thx,
Gayani
|
|
|
|
|
Don`t worry... Its ust a security constraint.You mail won`t be sent,but stored in the "C:\Inetpub\mailroot\Queue" folder. Once you deploy ur application on production server, just change the settings from localhost to your smtp server.
|
|
|
|
|
when i place a calendarPopup control into updatepanel it doesn't work
|
|
|
|
|
legend_of_zanado wrote: when i place a calendarPopup control into updatepanel it doesn't work
CalendarPopup? What type of control it is?
|
|
|
|
|
Are you using any third party control or you are using Calendar control in a popup window?
cheers,
Abhijit
|
|
|
|
|
Hi,
Yes..its possible that CalendarPopup Control would not work with ScriptManagers and UpdatePanel.
Beause it collide with the JavaScripts used in ScriptManager.
Thx,
Gayani.
|
|
|
|
|
In an ASP.NET web site, I am getting compiler errors on 12 out of about 70 pages, complaining about another partial declaration of the code behind class existing, yet only one declaration of the class exists in the entire solution. I suspect that something somewhere still has a 'declaration' for these classes in a binary, but I don't know where to start looking.
|
|
|
|
|
I discovered that the 'phantom' class is always generated as a partial class for the 'designer' code.
|
|
|
|
|
I have a webservice test.asmx which is located in test folder and has GetContents webmethod and . Inside
this directory i have one more directory test2 which has webservice test.asmx which has same webmethod GetContents().
whenever a webrequest GetContents() is made I have a httpmodule which is used for redirecting from test\test.asmx webservice to the
to the webservice test\test2\test.asmx based on a particular version.
But Server.Transfer("test2\test.asmx") is throwing the exception
"Error executing child request for test2\test.asmx."
or there is any approach through which i can redirect.
Iam using dot net framework 2.0.
Any help is appreciated.
|
|
|
|
|
does the Exception come with more information? Something like an InnerException?
Maybe Server.Transfer("~/test2/test.asmx") will work.
Good Luck
|
|
|
|
|
I write this code for editing datalist.there is an upload and two textbox in EditItemtemplate .but when I go to edit mode ,sometimes I want to edit only ,for example name in one textbox and I don't want to change or upload a picture for it.at this time this code has error because the upload control is empty. what should I do?
protected void datalist_editcommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
DataList1.DataBind();
}
protected void datalist_cancelcommand(object source, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = -1;
DataList1.DataBind();
}
protected void datalist_updatecommand(object source, DataListCommandEventArgs e)
{
int stid = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
TextBox firstname = (TextBox)e.Item.FindControl("txtfirst");
TextBox lastname = (TextBox)e.Item.FindControl("txtlast");
FileUpload picupload = (FileUpload)e.Item.FindControl("FileUpload1");
string filename=Path.GetFileName(picupload.FileName);
picupload.SaveAs(Server.MapPath("~/pic/")+filename);
SqlConnection con=new SqlConnection(connectionstring);
string sqlup = "update stt set stname=@stname,stlastname=@stlastname,picture=@picture where stid=@stid";
SqlCommand com = new SqlCommand(sqlup, con);
com.Parameters.AddWithValue("@stid", stid);
com.Parameters.AddWithValue("@stname", firstname.Text);
com.Parameters.AddWithValue("@stlastname", lastname.Text);
com.Parameters.AddWithValue("@picture","~/pic/"+filename);
con.Open();
com.ExecuteNonQuery();
con.Close();
DataList1.EditItemIndex = -1;
DataList1.DataBind();
}
protected void datalist_deletecommand(object source, DataListCommandEventArgs e)
{
int stid = Convert.ToInt32(DataList1.DataKeys[e.Item.ItemIndex]);
SqlConnection con=new SqlConnection(connectionstring);
string sqldel = "delete from stt where stid=@stid";
SqlCommand com = new SqlCommand(sqldel, con);
com.Parameters.AddWithValue("@stid", stid);
con.Open();
com.ExecuteNonQuery();
con.Close();
DataList1.DataBind();
}
|
|
|
|
|
bbc_sh wrote: for example name in one textbox and I don't want to change or upload a picture for it.
First check if FileUpload control has file then save it
FileUpload picupload = (FileUpload)e.Item.FindControl("FileUpload1");
string filename="";
if(picupload.HasFile)
{
filename=Path.GetFileName(picupload.FileName);
<small>this code gave you an error because how did you get filename if fileupload control did not have any file</small>
picupload.SaveAs(Server.MapPath("~/pic/")+filename);
}
your sql query string also will be changed like this
if you do not want to change the picture then you need not to pass picture parameter to the sql query string
string sqlup = "update stt set stname=@stname,stlastname=@stlastname ";
if(filename!="")
{
sqlup +=" ,picture=@picture ";
}
sqlup +=" where stid=@stid";
your parameter also changed
Also you need not to add parameter of picture file
if(filename!="")
{
com.Parameters.AddWithValue("@picture","~/pic/"+filename);
}
regards
kHan
please don't forget to vote on the post that helped you.
|
|
|
|
|
Hi,
how can i update opener parent if opener is closed ?
This are the scenario
1. MyPage - > MySecondPage
in This case, i am able to refresh Mypage using ProgressWindow
2. MyPage -> MiddlePage -> MyScondPage
in this case i have to update MyPage , but problem is , when MySecondPage opening , its close MiddlePage [ This is Requirment ]. Now i am unable track the parent . Please Help
Check out the close
function CloseNupdateWindow()
{
if ( window.opener && window.opener.closed )
{
}
else
{
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow)
{
window.opener.progressWindow.close()
}
window.close();
}
}
cheers,
Abhijit
|
|
|
|
|
Do you need to open a new window for the second page? Can't you open it in the same window?
Otherwise, close the window for the middle page from the second page, so that you can pick up it's parent before you close it.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Guffa wrote: Do you need to open a new window for the second page? Can't you open it in the same window?
No, i have to open it on "Second Page". This is Requirment.
Guffa wrote: close the window for the middle page from the second page, so that you can pick up it's parent before you close it.
you want to mean, i just close middle page from Second page ? but after that will i able to get the orginal parent id ?
Thanks for response !!!
cheers,
Abhijit
|
|
|
|
|
Abhijit Jana wrote: you want to mean, i just close middle page from Second page ? but after that will i able to get the orginal parent id ?
No, before that you are able to get the parent of the middle page window. Put the reference to the parent window in a variable, so that you can still get to the parent window when you have closed the middle page window.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|