Security :: Get The IP, Subnet Mask And Default Gateway?
Jul 29, 2010I wonder if is there a way to get the subnet mask and default gateway (the IP I can get it) the way I'm getting the IP is the following:
[Code]....
I wonder if is there a way to get the subnet mask and default gateway (the IP I can get it) the way I'm getting the IP is the following:
[Code]....
well i try to create a RegularExpressionValidator to validate subnet mask.
View 3 Repliesi want to use payment gateway in my asp.net site.so i want to know the difference between WEB payment gateway and WAP payment gateway.
Both are same or we have to buy them differently.....
i want the difference because i will also create wap site to run on mobile.
My site currently uses the asp.net membership functionality to allow uses into the members only area of my site. At the moment it is free.
I want to start charging for access. Can someone point me in the right direction to integrate a payment gateway with membership?
I am using regular expression for checking the subnet masking. I use ajax txtbox with masking value but that is not working, then I switched to a textbox and applying a regular expression for that. unfortunatly that one is also not working.
Solution: I was using masked text box and don't know how to put validation expression. Finally I found a property of masked text box as validation expression, and there I put the RE and change the property validate to true. No need to use validator expression explicitly.
I am trying to secure very mixed content that is located in an ASP.NET directory. For purposes of this question, it can be ~/MyApp/.
I want all of the content in the directory and its subdirectories restricted to authenticated users. The default.aspx page, though, should be accessible to everyone. This is the web.config in that directory:
[Code]....
Now if you are an unauthenticated user, everything works fine if you request [code]....
The problem occurs in that visitors do not always request "Default.aspx". We have a default document configured so that they get Default.aspx even if they just request "/MyApp". An authenticated user works fine, but an unauthenticated user is directed to the login page.
Now I know that essentially this happens because even though the request for "/MyApp/" will actually end up serving up "/MyApp/Default.aspx", the security system is only checking for "/MyApp/" since that is what I requested. That is then getting the default security for the directory.
How can you configure an exception to allow access when no particular file is requested in the directory??
Is there some dependency between DefaultDocumentModule and UrlAuthorizationModule? In this environment, the UrlAuthorizationModule has been removed and re-added in order to make sure it fires for non-managed requests. I would not expect that to change the order of execution, though, since UrlAuthorizationModule usually goes after DefaultDocument.
A workaround could be to set up the opposite security with the directory being open, and then trying to secure individual files. Because of the (changing) number of files, and extensions, etc, and the fact that you cannot use wildcards in a <location>, this is not really a workable solution for me.
I'm making another attempt to find out how to use a different profile in the web application. I though it would be quite simple. but couldn't find an answer anywhere.
All I need to know is how to call "i90ProfileProvider" instead of default "i90PartnerProfileProvider" in C# or VB.
<profile defaultProvider="i90PartnerProfileProvider">
<providers>
<clear/>
<add name="i90PartnerProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90Partner"/>
<add name="i90ProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="i90"/>
</providers>
There must be the way to do this. For user it works just fine:
MembershipUser user=
Membership.Providers["providername"].GetUser("username",false);
If there is a way to add a name for Profile Provider in web.config, then there must be a way to use it.
Or I should do something entirely different to retrieve the user profile form another database?
Server Error in '/' Application. Default Membership Provider must be specified. 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.Configuration.Provider.ProviderException: Default Membership Provider must be specified. Source Error:
[Code]....
Stack Trace:
[Code]....
We are developing an application which having two login pages. The problem now is that in the session timeout, the page is redirected to one page which is given in the config file. Is there is any way we can customize the way in which it should redirect to which page depending upon the page where the session timeout is happening.
View 5 RepliesI'm trying to develop local website that records and save to sqlserver the private ip of person who will login to my website, Im using Windows Server r2 as my server, Now my problem is it only records the IP with same segment of my server which is segment zero like(192.168.0.83), if the IP of user is segment 1 or 2 the only the Default gateway of their IP are being saved, Correct me if I am wrong if it is defends on segment or gateway.
Code:
if (string.IsNullOrEmpty(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]))
{
Label2.Text = (Request.ServerVariables["REMOTE_ADDR"]);
}
else
{
Label2.Text = (Request.ServerVariables["HTTP_X_FORWARDED_FOR"]);
}
I'm trying to mask text box with 2 different masks when a check box has been checked using jquery.I tried my code with html text box and html check box and it is working ok but when I tried my code with asp text box and asp check box there is no response.
[code]...
After a new user first registers at the website, I want to force them to first be approved by an admin before allowing them access to the full site. I created different roles in the ASP.net configuration tool that denies them access but the default setting allows them in. How do I go about this?
View 1 RepliesI would like to redirect the user to default page if he tries to copy paste an URL to browser. Like if i copy the url [URL] and paste it in the browser it should refirect me to default page.
View 3 RepliesSo I posted earlier on here because I had probelms connecting the login control to my database. All the login controls worked except the actual login. I created a user, that went to my database, but the login part still went to the defult .mdf file. So I have rebult this website from scratch many times. Not a big deal, I'm just starting it. But I'm really confused on how to connect to my database. It seems one way will work one time, but the next time it doesn't, and I have to connect in a diffrent way. And I always get diffrent errors.
Here is what I need to do, maybe there is a easier way of doing this. I already have a 32 bit program that uses a database. I'm just creating a web client to connect to the same db. I don't mind using the default mdf with the login controls. It already there, why re create it.
My thought was to take the asp tables created for the loging controls, add them to my exsisting DB. Point the login controls to my db. Create a realationship betwen the login user table and my user table so when a user logs in, they will see the correct information. I tried to leave the mdf file for the login control where it is, but I can't connect that with my db.
I've got a masterpage wih a LoginStatus control on my masterpage, when I click this it brings up loginpage.aspx. I log in and then it automatically returns me to default.aspx, how can I chage this to EngineersHome.aspx? I've tried changing the webconfig file so it has
authentication
mode="Forms">
forms
loginUrl="Login.aspx"
defaultUrl="EngineersHome.aspx"
/>
</authentication>
but this hasn't worked. When I logout using the LoginStatus it directs me to Default.aspx which is fine, I want this to stay as it is.
I am in the initial stage of implementing a new webstie, which will use only twitter and facebook to login and use. So my approach is not use any Default memberhip database, just simple store the user data in my created "membership" database. I will set cookies and use sessions to restrict and grant access to various parts of the sites. So for example, the user creates an account and I set a cookie allowing him or her to traverse the site. And on each page request from the client browser check to see if my website cookie is there in the browser and if it has expired or not.
View 1 RepliesHow do i set the default profile when a user logs in. I have an application where the users (once they are authenticated) are in either the logged in, premium, or promotion profile. right now it assigns none. How do i make every user automatically be part of the promotion profile.
View 2 RepliesThis is probably a lame question, but I know little of web development. I inherited a web project that I'm trying to get running locally. I get the mentioned error on line 46.
Line 44: </authentication>
Line 45: <membership defaultProvider="AD_MyCompanyName" />
Line 46: <roleManager enabled="true" defaultProvider="ADRP_MyCompanyName_Readonly" cacheRolesInCookie="true" cookieName="MyCompanyName.ROLES" createPersistentCookie="true" cookieSlidingExpiration="true" cookieTimeout="240" />
Line 47: <profile enabled="false"/>
Line 48: <customErrors mode="Off"/>
This code works on the old developer's box, but not on mine. I've been working through some TFS checkout issues on his box, assuming it was simply files left checked out. I can't figure out where the providers are added. I don't see them being added in the config file above. In fact, if I search for "AD_MyCompanyName" and "ADRP_MyCompanyName_Readonly", I get no hits in the entire solution. I can't figure out what they are. Not sure why it works on that box if I can't even find the providers being added.
Is there a way to create the required Membership tables/SPs for Oracle? Just what aspnet_regsql does. Something like aspnet_regORACLE :).
View 4 RepliesWe are using membership and roles.. is there anyway to setup a user that cannot be deleted? We need to setup a default admin account and dont want it displayed in list of user to modify, or if it has to be displayed, it cant be deleted or edited thru the pages that is, if they need to, they can do it thru the website admin section to manage it.
View 4 RepliesI need to know how to implement a payment gateway in ASP.NET for my billing based project.
Is there one gateway enough to access all the bank account?
In my site I need to access the payment gateway. i tried many ways. I used Paypal to create a direct payment account but exception is thrown. Is there any other way to implement the payment gateway. I tried many links posted in this forums but had no good result.
View 10 RepliesHow to integrate payment gateway in asp.net.am new one for this section.
View 3 RepliesAnd i want to integrate that sms gateway in in asp.net web form
View 1 RepliesThis works fine: Controller.cs
ViewData["MyText"] = "Hello World";
Index.aspx
<%: Html.Label(ViewData["MyText"].ToString()) %>
But the complete text is not displayed when I add just a dot "." to "Hello World". I thought "<%:" takes care for this but it seams that this is not true... How to solve this? How to mask the dot? Changing "." with "%2E" doesnt work ;-(