|
Yeah, plus my application needs to be usable from anywhere. I am implementing username/password authentication, but I'm worried my users could create their own application and utilise the web service (using their creddentials), and do some malicious things.
In all honesty it'd probably never happen - but it's discouraging not to be able to solve this problem.
|
|
|
|
|
Then you have to defend your application from dodgy input. You have to ensure that your webservice is strict on validating the inputs. That will minimise any damage that may occur if someone does find a way through the authentication process.
|
|
|
|
|
Other than these suggestions you can restrict accepting IP's from IIS:
Property of Directory in IIS----> Directory Security----->Edit button in IP address and domain name restriction
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Hi,
I have a gridview control on an ASP.NET page which I want to populate by binding an array of items to it. The items were all strings so it was easy to do, just have columns with bound fields and setting the DataFields to the property names like this:
<asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="false" >
<Columns>
<asp:BoundField HeaderText="Product" DataField="Name" />
<asp:BoundField HeaderText="Description" DataField="Description" />
</Columns>
</asp:GridView>
I now need to add a new item and it consists of an object with a few strings as properties. I'd like to do this but I can't of course:
<asp:BoundField HeaderText="Product Code" DataField="Product.Code" />
...where the Product is the object and Code is a string member.
How can I do it? Do I need a template? If so, how?
Thanks
|
|
|
|
|
|
Try this:
<asp:TemplateField HeaderText="Product Code">
<ItemTemplate>
<asp:Label ID="abc" runat="server"
Text='<%# Eval("Product.Code") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
The first time any application I write tries to consume a webservice I always encounter a substantial delay. Typically the delay is about 15-20 seconds. Any subsequent calls are very fast. It seems as if under the hood there is some sort of initialization process perhaps?
Can anyone tell me what is going on here and if there is a way to speed thus up? If it helps, I'm using C#, VS2005. I have this problem on any machine I develop on and any machine I run my compiled app on.
Thank you!
|
|
|
|
|
hdv212 wrote: network host="mail.yahoo.com"
You can't use mail.yahoo.com unless you have a paid account with yahoo(The smtp host name may defer for the paid accounts). Try using the smtp host of your company, it should work.
|
|
|
|
|
Well, since he deleted his original post, I guess you hit it right on the money.
Ben
|
|
|
|
|
Hi Developers
From where I can download "Live Chat" project which can be easily integrated with my existing Web Ap.
Lets work it Out.........!
|
|
|
|
|
|
Hello all,
I am having this problem with IIS, where nothing seems to appear as the default website, and when I click to expand the Websites folder, there is nothing under it. Could this be related to a security issue set on my computer? I do not have write access to the Inetpub folder, I only have read.
Sincerely,
The Major Rager
|
|
|
|
|
This question is for those familiar with the asp.net 2.0 ajax accordion which ships with the ajax control toolkit.
By default, the only way to close a content pane is to click on the header pane, activing the link within it which returns false and has an href of "".
What I need to do is to close the content pane from codebehind after performing a database update.
I know this probably has to be done by sending client script to the browser, but so far I've tried sending (clientscript.registerclientscriptblock(page.getType,newid,(function to click on the header))
and the control cannot be found at runtime to be clicked (document.getele...null or not an object). I know others will want to do this eventually, or perhaps have already found a way to, so I'll throw this out there and see if anyone can help.
Thanks in advance.
|
|
|
|
|
When I was used CheckBoxList Control. I save data through check boxes in data base. How can check the check boxes when I was retriving the data back end to front end
dfd
|
|
|
|
|
dt_News = SqlHelper.ExecuteDatatable(SqlHelper.ConnectionString, CommandType.Text, "select newsletter_type_id,newsletter_type_name from newsletter_type_master");
chkNews.DataTextField = "newsletter_type_name";
chkNews.DataValueField = "newsletter_type_id";
chkNews.DataSource = dt_News;
chkNews.DataBind();
/////////Get and display checked newsletter
dt_NewsClicked = SqlHelper.ExecuteDatatable(SqlHelper.ConnectionString, CommandType.Text,
"select newsletter_type_id from user_newsletter_type where user_id='"+userId+"'");
int w = dt_NewsClicked.Rows.Count;
int[] newsChecked = new int[20];
for (int i = 0; i < dt_NewsClicked.Rows.Count;i++)
{
newsChecked[i] = Convert.ToInt32(dt_NewsClicked.Rows[i]["newsletter_type_id"].ToString());
}
for (int a = 0; a < w ; a++)
{
chkNews.Items[newsChecked[a]-1].Selected = true;
}
------------------------------------------------------------------------
note : I use free SQLHelper Class to connect with database.
chkNews is my Checkbox group.
Regards,
Mayank Parmar
Senior Software Engineer
Amba Tech
Gandhinagar, India
|
|
|
|
|
i want to validate the input for numeric, character and hyphen . Can anyone help me out .
thanks in advance.
|
|
|
|
|
|
I use CSS and Visual Basic to implement a web site.
I use this code:
body#Linkbutton1 li.Linkbutton1 a:link{
color: #FFFFFF;
background-color: #CC0000;
}
body#Linkbutton1 li.Linkbutton1 a:visited{
color: #FFFFFF;
background-color: #660000;
}
body#Linkbutton1 li.Linkbutton1 a:hover{
background-color: #660000;
color: #FFFFFF;
}
body#Linkbutton1 li.Linkbutton1 a:active{
background-color: #660000;
color: #FFFFFF;
}
but the active selector dose not worked.
|
|
|
|
|
I think you may be misunderstanding what the active selector does. It is the state a link is in as the mouse (or keyoboard...I think) button is pressed down. In your case you have the same colour as the :hover state so you won't see any difference. The default (IE) behaviour for :active is to colour the link red, try using a different colour and you'll see what I mean.
A couple of tips I thought I'd mention about your styles:
- I can't see white on red being that easy to see, do you know how colour blind people will see it?
- You may want to consider having a different colour for the :visited state. I know its nice to keep your links always the same colour, but depending on the links purpose its always best to let a user know where they've been (by purpose I mean if your link is performing a function rather than navigating the user, which in this case it looks like it might be, then having the same colour is probably OK)
|
|
|
|
|
I am looking for a suitable tutorial or sample code in C#, asp.net (AJAX.NET) to diaplay Map or jpeg image and overlay wmf or emf icon and drag and reposition online.
--Himanshu
Dr.H.S.Mazumdar
Sr.Member IEEE
|
|
|
|
|
suppose i have one master page and content page.in my content page there are many controls like textboxes,checkboxes.
i want that when i will click on a button then i want to clear all textboxes.so please tell me how could i do this
whenever we work with master page and content page in asp.net 2.0
tbhattacharjee
|
|
|
|
|
I don't think there is any easy way of doing this. If you happen to be dynamicly creating your controls and they are in some sort of array or collection. Then you could loop through that and clear them out. Now all you have is the controls collection off of the Page. This is more difficult since you don't know which controls are in that collection. So as you are looping through the control collection you with have to do some checks. Something like
if (Control is TextBox)
{
TextBox(Control).Text = String.Empty;
}
As so forth. If you have a lot of controls 20+ it might be worth writing this code. Otherwise you might as well just create a method that will clear out the controls by name.
Hope that helps.
Ben
|
|
|
|
|
Hi,
My ASP.NET page calls a method in a separate DLL. In the DLL it opens an XML file but when I run it, it can't find the XML file because it's looking in the wrong place I think.
If it was code-behind on an ASP.NET page I'd just use Server.MapPath() to locate the XML file but how can I do it in the DLL method my ASP.NET page calls?
Thanks
|
|
|
|
|
Have you considered passing the path as a parameter to the method that you're calling? That would allow you to map the path in your ASP.NET page and pass the fully qualified path to your library.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Try taking a look at the System.Environment class. It has a method CurrentDirectory() which returns the current working folder. You can also try Application.StartupPath.
|
|
|
|