Monday, March 26, 2012
Suggestion Regarding Securing the ASP.NET Web Page......
I have problem regarding security of the page. I want that the every asp.net
web page is accessed via application. If a user directly access the page via
writing the address of the page in the address bar. Then It should be
blocked to access the page.
I have two options in my mind.
1. Using Query String Parameters
2. Using Session Object
But I got the following problem with these techniques.
WIth Query String the problem is that if the user access the page via
application then the query string parameters are shown in the address bar so
there he can used these parameters in the direct access, which i did not
want.
With Session Object, If the user login from the application then its session
is created. so now he can write the direct address in the address bar to
access the page directly which i dont want.
Actully My application is frames base application.
There are threee frames vertically
1) Header
2) Body ( Body Portion contains the two horizontal frames )
2.1) Menu
2.2) Content
3) Footer
In the menu area user selects the menu and against that menu the page is
loaded in the content portion.
So please help me how can i block user to access the page directly.
Regards,
Muhammad Jamil NawazThe Request object will have an HttpRequest.UrlReferrer Property. If this
property does not have a value then it means that the user has typed the
URI. This is not a foolproff method though but can still keep the average
user.
Regards,
Trevor Benedict R
MCSD
"Muhammad Jamil Nawaz" <jamfiza12@.hotmail.com> wrote in message
news:%23$JElX80FHA.2752@.TK2MSFTNGP12.phx.gbl...
> Hi Everybody,
> I have problem regarding security of the page. I want that the every
> asp.net
> web page is accessed via application. If a user directly access the page
> via
> writing the address of the page in the address bar. Then It should be
> blocked to access the page.
> I have two options in my mind.
> 1. Using Query String Parameters
> 2. Using Session Object
> But I got the following problem with these techniques.
> WIth Query String the problem is that if the user access the page via
> application then the query string parameters are shown in the address bar
> so
> there he can used these parameters in the direct access, which i did not
> want.
> With Session Object, If the user login from the application then its
> session
> is created. so now he can write the direct address in the address bar to
> access the page directly which i dont want.
> Actully My application is frames base application.
> There are threee frames vertically
> 1) Header
> 2) Body ( Body Portion contains the two horizontal frames )
> 2.1) Menu
> 2.2) Content
> 3) Footer
> In the menu area user selects the menu and against that menu the page is
> loaded in the content portion.
> So please help me how can i block user to access the page directly.
> Regards,
> Muhammad Jamil Nawaz
>
Use Session.
Use the sessionstate as "auto" mode (not cookieless = false) to also
take care of scenarios where cookies may be disabled (a large section
of corporates disable cookies).
Cheers,
Gaurav Vaish
http://mastergaurav.org
--
Thursday, March 22, 2012
supply itemtemplate for datalist at runtime
i'm programattically creating a datalist and rendering it to the page via a htmltextwriter.
i want to supply the itemtemplate at runtime but don't know how to do this.
i read the help at ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWebUIITemplateClassTopic.htm
but i don't understand how that translates from what i'm familiar with in terms of a html template.. e.g:
<table><tr><td><% Container.DataItem %></td></tr></table
is there some way to just use a string? i'm probably being too simplistic.
thanks for any help
tim
\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3Hi Tim:
One easy way to do this is to create the templates as user controls
and bind them dynamically.
http://msdn.microsoft.com/library/d...UserControl.asp
There is also a programmatic approach:
http://msdn.microsoft.com/library/d...namically. asp
HTH,
--
Scott
http://www.OdeToCode.com/
On Sun, 10 Oct 2004 12:18:31 +0100, "Tim Mackey" <tim@.scootasp.net>
wrote:
>hi,
>i'm programattically creating a datalist and rendering it to the page via a htmltextwriter.
>i want to supply the itemtemplate at runtime but don't know how to do this.
>i read the help at ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWebUIITemplateClassTopic.htm
>but i don't understand how that translates from what i'm familiar with in terms of a html template.. e.g:
><table><tr><td><% Container.DataItem %></td></tr></table>
>is there some way to just use a string? i'm probably being too simplistic.
>thanks for any help
>tim
>
>\\ email: tim at mackey dot ie //
>\\ blog: http://tim.mackey.ie //
>67d0ebfec70e8db3
hi Scott,
many thanks for the reply.
this is very helpful.
tim
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:kfhim0h6u1soa0t8pvfnjeld55djf9ltao@.4ax.com...
> Hi Tim:
> One easy way to do this is to create the templates as user controls
> and bind them dynamically.
> http://msdn.microsoft.com/library/d...UserControl.asp
> There is also a programmatic approach:
> http://msdn.microsoft.com/library/d...namically. asp
> HTH,
> --
> Scott
> http://www.OdeToCode.com/
> On Sun, 10 Oct 2004 12:18:31 +0100, "Tim Mackey" <tim@.scootasp.net>
> wrote:
>>hi,
>>i'm programattically creating a datalist and rendering it to the page via
>>a htmltextwriter.
>>i want to supply the itemtemplate at runtime but don't know how to do
>>this.
>>i read the help at
>>ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWebUIITemplateClassTopic.htm
>>but i don't understand how that translates from what i'm familiar with in
>>terms of a html template.. e.g:
>><table><tr><td><% Container.DataItem %></td></tr></table>
>>
>>is there some way to just use a string? i'm probably being too
>>simplistic.
>>thanks for any help
>>tim
>>
>>
>>\\ email: tim at mackey dot ie //
>>\\ blog: http://tim.mackey.ie //
>>67d0ebfec70e8db3
supply itemtemplate for datalist at runtime
i'm programattically creating a datalist and rendering it to the page via a
htmltextwriter.
i want to supply the itemtemplate at runtime but don't know how to do this.
i read the help at ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemWe
bUIITemplateClassTopic.htm
but i don't understand how that translates from what i'm familiar with in te
rms of a html template.. e.g:
<table><tr><td><% Container.DataItem %></td></tr></table>
is there some way to just use a string? i'm probably being too simplistic.
thanks for any help
tim
\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3Hi Tim:
One easy way to do this is to create the templates as user controls
and bind them dynamically.
http://msdn.microsoft.com/library/d...UserControl.asp
There is also a programmatic approach:
http://msdn.microsoft.com/library/d...a
lly.asp
HTH,
Scott
http://www.OdeToCode.com/
On Sun, 10 Oct 2004 12:18:31 +0100, "Tim Mackey" <tim@.scootasp.net>
wrote:
>hi,
>i'm programattically creating a datalist and rendering it to the page via a
htmltextwriter.
>i want to supply the itemtemplate at runtime but don't know how to do this.
>i read the help at ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemW
ebUIITemplateClassTopic.htm
>but i don't understand how that translates from what i'm familiar with in t
erms of a html template.. e.g:
><table><tr><td><% Container.DataItem %></td></tr></table>
>is there some way to just use a string? i'm probably being too simplistic.
>thanks for any help
>tim
>
>\\ email: tim at mackey dot ie //
>\\ blog: http://tim.mackey.ie //
>67d0ebfec70e8db3
hi Scott,
many thanks for the reply.
this is very helpful.
tim
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:kfhim0h6u1soa0t8pvfnjeld55djf9ltao@.
4ax.com...
> Hi Tim:
> One easy way to do this is to create the templates as user controls
> and bind them dynamically.
> http://msdn.microsoft.com/library/d...UserControl.asp
> There is also a programmatic approach:
> http://msdn.microsoft.com/library/d...br />
cally.asp
> HTH,
> --
> Scott
> http://www.OdeToCode.com/
> On Sun, 10 Oct 2004 12:18:31 +0100, "Tim Mackey" <tim@.scootasp.net>
> wrote:
>
>
support language
is .net support java ?
thanks
--
sachin_himcs
----------------------
Posted via http://www.codecomments.com
----------------------"sachin_himcs" <sachin_himcs.26v5tp@.mail.codecomments.com> wrote in message
news:sachin_himcs.26v5tp@.mail.codecomments.com...
> is .net support java ?
What do you actually mean?
support language
I want to know that
...net support many language .is java one of them language.
--
sachin_himcs
----------------------
Posted via http://www.codecomments.com
----------------------Microsoft's J# is supported, yes. Otherwise it isn't actually about MS, but
if a compiler is written for the specific language which emits CLS-compliant
MSIL. So basically if someone has written .NET compiler for full-blown Java,
then yes
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"sachin_himcs" <sachin_himcs.270ptp@.mail.codecomments.com> wrote in message
news:sachin_himcs.270ptp@.mail.codecomments.com...
> sir
> I want to know that
> ..net support many language .is java one of them language.
>
> --
> sachin_himcs
> ----------------------
> Posted via http://www.codecomments.com
> ----------------------