|
Dear All,
I have a web application (ASP.NET / framework 2.0 / Windows Server 2003) on one machine, i.e. Web Server and corresponding database (SQL Server 2005) on second machine.
If I access the application from Web Server, it works fine, but when I access from a third client machine it gives following error
-------------------------------------------------------
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 'NT AUTHORITY\ANONYMOUS LOGON'.
-------------------------------------------------------
I think this has some thing to do with the permissions to access DB from client machines
my Web.config file has following things added
---------------------------------------------------------
<add name="ConnString" connectionString="workstation id=MY_WORKSTATION;packet size=4096; integrated security=SSPI;data source=MY_DB; persist security info=False;initial catalog=MY_CATALOG"/>
<system.web>
.....
<identity impersonate="true"/>
.....
</system.web>
---------------------------------------------------------
Moreover, the SQL Server is configured as per following link
"http://support.microsoft.com/kb/914277"
Please guide
Regards
Sachin
|
|
|
|
|
How to close a frame from either javascript or from code behind in a page? Suppose if in a page two frames are present and in one frame an aspx page is present...in onClick of a button in the aspx page the other frame should be closed and the aspx page should occupy the whole window ...is there any way to do this?
Koushik
|
|
|
|
|
I guess you can't close a frame. You can redirect to other page which don't have any frames.
|
|
|
|
|
code for get HTML Source from input URL
using System.Web.Caching;
using System.Net;
using System.IO;
string URL = TextBox1.Text;//INPUT URL
if (URL.Substring(0, 7) != "http://")//CHECK URL CONTAIN http://
{
URL = "http://"+TextBox1.Text;
}
string ConvertURL =(string)Cache.Get(URL);
if (ConvertURL == null)
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(new Uri(URL));
HttpWebResponse res = (HttpWebResponse)req.GetResponse();
StreamReader srdr = new StreamReader(res.GetResponseStream());
ConvertURL = srdr.ReadToEnd();
}
Response.Write(ConvertURL);
Raju.M
http://aspdotnetprogrammer.blogspot.com/
|
|
|
|
|
makhaai wrote: URL = "http://"+TextBox1.Text;
Why reading it from the text box again? Just do:
URL = "http://" + URL;
makhaai wrote: string ConvertURL =(string)Cache.Get(URL);
Why do you look in the cache for the source? Do you have any code elsewhere that stores anything in the cache?
You forgot to dispose the HttpWebResponse and the StreamReader.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
He was not asking a question, it seems like he is advertising this[^]
|
|
|
|
|
N a v a n e e t h wrote: He was not asking a question
Yeah, I didn't see any question, but he got an answer anyway.
N a v a n e e t h wrote: it seems like he is advertising this[^]
Seems you can take any crappy code and make a blog out of it...
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
makhaai wrote: please tell wat is the prob in my code?
I just did.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
i have a jaascript function. and a gridview , which contains a button.My problem is , how i should add the attributtes of that utton.i am doing it in the following manner.
on form load i am extracting the id of button (whichh is in gridview).
Button l = (Button)GridView1.FindControl("p");
l.Attributes.Add("onClick", "javascript:return abc();");
and in java script i am extracting the button id in the following manner.
function abc()
{
var a = document.getElementById("<%=GridView1.subassembly.ClientID%>");
alert(a);
}
after doing this , i am gettng an error, does not contain the definition for
subassembly.
Where is the problem lying?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
Sonia Gupta wrote: i am gettng an error, does not contain the definition for
subassembly.
From this you got the error. What's the problem now ?
Sonia Gupta wrote: var a = document.getElementById("<%=GridView1.subassembly.ClientID%>");
What is the use of getting Gridview's client id here ? Controls inside gridview will be having different id.
|
|
|
|
|
U have place button inside a gridview of row. If yes use this code in rowDataBound Ok.
Button btn=(Button)e.Row.FindControl("buttonID");
btn.Attributes.Add("onclick","javascript:abc('"+btn.ClientID+"')");
It will work.
Devjit Das.
|
|
|
|
|
actually , i have textbox also, and after leaving the textbox blank , i want a messagebox.
that's y i am writig the code in the source file.
and i am using this tag var a = document.getElementById("<%=GridView1.subassembly.ClientID%>");
in java script because the page is of master type, i mean the html is under content place holder tag.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
what ever u want to do do.
just use like this of script function.
function abc(id)
{
var a = document.getElementById(id);
alert(a);
}
Devjit Das
|
|
|
|
|
what happen have u done.
Devjit Das.
|
|
|
|
|
how should i access the button id which is placed in the template column of gridview.and i want to wite the funciton in javascript at source file.
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
what is this i have all ready given the code. just once again.
In grid use this event.
grid_RowDataBound
Button btn = (Button)e.Row.FindControl("buttonID");
btn.Attributes.Add("onclick", "javascript:abc(" + btn.ClientID + ")");
Note buttonID means the id u have provide in grid template ok.
javascript function
function abc(id)
{
document.getElementById(id);
alert("Plz enter value");
}
It will work . ok
Devjit Das
|
|
|
|
|
InsDev wrote: function abc(id)
{
document.getElementById(id);
alert("Plz enter value");
}
message box is saying null.
anything missing?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
in ur code message box never say null. Ok
use like ...
var _txt=document.getElementById(id);
alert(_txt);
See object ur r getting or not.
Devjit Das.
|
|
|
|
|
i am not gettin the object , i am getting null message
this is the code.
Button b = (Button)e.Row.FindControl("update");
TextBox t = (TextBox)e.Row.FindControl("insettextbox");
if (b != null && t != null)
{
b.Attributes.Add("OnClick", "javascript:abc(" + t.ClientID + ")");
}
<script language="javascript" type="text/javascript">
function abc(a)
{
var _b = document.getElementById(a);
alert(_b);
}
</script>
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
javascript:abc('" + t.ClientID + "') use like. Today it will have to work.ok go on.
Devjit Das.
|
|
|
|
|
Yessssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
congratulate u have done it. if u don't mind where u r working. because i have seen u code project last six month.
Devjit Das.
|
|
|
|
|
function abc(a)
{
var b = document.getElementById(a);
alert(b.value);
return false;
}
protected void rowbound(object sender, GridViewRowEventArgs e)
{
Button b = (Button)e.Row.FindControl("update");
TextBox t = (TextBox)e.Row.FindControl("insettextbox");
if (b != null && t != null)
{
b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');");
}
}
i don;t want the postback after writing the return false.
anything is happening wrong?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
use this one.
b.Attributes.Add("OnClick", "return javascript:abc('" + t.ClientID + "');return false;");
But tell me what u have write previous.
Devjit Das.
|
|
|
|
|
open my previous thread and u will see the efeect on ur machine.
Not getting u.
Devjit Das.
|
|
|
|