Forms Authentication With Web.config Works On Dev But Not On Live

Feb 27, 2010

[Code] When I run this on my visual studio 2008 dev server it runs fine and works well. When I publish to IIS I always get Http 403 Forbidden Errors when trying to access any page on the site. There is 1 folder within my site that should be login protected called 'administration'.

View 2 Replies


ADVERTISEMENT

My.Settings.MyConnectionString Works But App.config Don't?

Oct 8, 2009

I'm not a WinForms developer, but have been doing ASP.NET for quite some time.I have to write something in VB.NET that just pushes some simple data to a database.So I created the VB.NET WinForms app (Visual Studio 2005).When I run the app it works fine for using:

Dim conMyData As SqlConnection
Dim cmdInsert As SqlCommand
Dim isSaved As Boolean

[code]....

That is, if I define the connection string inside of the properties of the project. If I build my project, snatch the .exe from the bindebug folder and run it on my desktop,it works ONLY if I have the version that says My.Settings.MyConnectionString Otherwise, if I use the other version where I am pulling the connection string from my app.config file it only works if I run the project through visual studio, it will not run by just opening up the .exe on my desktop. It syas something like ConnectionString not set, or sometimes it states object not set to an instance of something... why does it work from within the project?Is it because when I build the project it cannot reference that app.config file since I've moved it to my desktop?

View 2 Replies

Asp.net - Is Forms Authentication Totally Necessary

Aug 18, 2011

I'm writing an internal web application right now (with ASP.Net Web Forms), and it presents an odd problem. I have to be able to impersonate the currently logged in windows user, and execute a command based on their Windows Authentication to log in.. AND ... if they don't have Windows Authentication set up in the application I have to use to log them in, I have to be able to accept a user name and password. I also have to write the application in .Net 4.0, and secure it as much as possible. I got this to work by NOT utilizing Windows Authentication or Forms Authentication in the web.config, and instead setting session variables to guard against user accessing pages in the web app other that the log in. I did this by creating an oddly name session variable with a value based on their user name (windows auth or not), and then a secret session variable. The secret variable is in the web.config as a 256bit encrypted string, in which I decrypt, and set as the session secret. In order for the page to load, the first session variable can't be blank, and the second variable has to equal the decrypted key value... if the variables don't pass inspection, it redirects them to the login page. I set this up on every page, generic handler, and webservice method in the web app. I make the session timeout after a few minutes of no activity, and on log out, I set all session variables to nothing, and expire all cookies. (I also disable all cache).

My question is... Does this offer comparable security to that of Forms authentication? I have always used Forms authentication, but can't use it here. If I did, the users would have to reconfigure settings in IIS and in he web.config to toggle login procedures (From my knowledge, you can't use both Forms authentication, and windows authentication to manage the security of your pages and other web resources). With the method described above, I can accomplish the best of both worlds, but am curious about the security of my methods. Is there anything else I can implement here to assure the utmost security other that using forms authentication? Is it possible to accomplish the same level of security of Forms authentication without using it?

View 1 Replies

C# - Forms Based Authentication?

Jun 24, 2010

If I wanted to make sure that AUTHENTICATED users were denied access to Enroll.aspx and UNAUTHENTICATED users had access how should my "allow/deny users" tags be set in the web.config?[code]......

View 2 Replies

.NET Forms Authentication Doesn't Work

Mar 20, 2011

I have an issue with my .NET application and it can only be reproduced sometimes and only on client's location, which makes it extremely difficult to resolve. In the application the forms authentication is used. There is a login page to which every anonymous user is redirected. After user enters username and password, it redirects to DefaultURL or some predefined page. The problem is that sometimes when user enters correct username and password, it doesn't login, instead it just refreshes the login page without any error messages. After several tries of inputing username and password, user is able to login to the system.

See my login page Submit_Click code below:

Dim userName As String = tbUsername.Text
Dim password As String = tbPassword.Text
Dim returnUrl As String = Request("returnUrl")

[code]....

View 2 Replies

C# - Use Authentication In 'Forms' And As Well In 'Windows' For A .net Web Application?

May 14, 2011

We have an application in Access for UI and MS Sql server as Database server. We now decided to build a new application in web application for UI. This web application is only used by the employees who work for the company. But later we decided to host this web application on outside server. So the user (from this company only.) can able to login anywhere in the world. First I thought creating the web application using 'windows' authentication thinking we may be using it as an intranet web application. But now my manager asked me to use both 'Forms' and as well as 'Windows' for using this application and this web application will be hosted on outside server. I really don't catch his point of using both types of authentication.

View 1 Replies

Forms Authentication Add SQL Database Variable

Aug 29, 2010

I am using Forms Based Authentication I have extended the Forms Authentication Tables creating a custom table called Profile_Contact that holds the user's GUID, username, email address, and other information. I have another table called Profile_Account which holds company account information such as Company Name, address info, phone numbers etc. This table has a Key Field called IDProfileAccount.

[Code]...

View 6 Replies

Forms Authentication And Stored In A SQL Database?

Mar 9, 2012

The Intranet was done with forms authentication and stored in a SQL database. how I go about (if possible) authenticating a login in a vb.net project that queries the user settings from the ASP.Net database that was created on the SQL server for the forms Authentication.

View 5 Replies

Forms Completion Using Windows Authentication?

Apr 6, 2009

I am reading the article at: [URL].. Forms Authentication in ASP.NET 2.0". I am using VS 2008 and .Net Framework 3.5. I don't know if this makes a difference, so please let me know.

A user logs on to our system in the morning Based on their Windows Authentication, they can access several intranet applications. For a particular application, the user has to select their Organization or Position or Location.

Based on the user's Windows Authentication, once the user selects one of the three above and clicks a "Submit" button, a second page is launched that shows certain information about the selection based on the User's authentication.

For example, if User selects Organization, the following information will be returned based on the Organization THEY are a member of. They can not access information from OTHER organizations, ONLY their own based on their login credentials. This information returned as a result of the dropdownlist selected value includes: street address, city, state, zipcode, Bus. Unit #, etc. appears in labels on the second page.

The labels can be dynamically created at runtime. (I dont know if a User control can be created to do this, since the "Position" and "Location" will contain the same address information, and it doesn't matter at the moment). I just want to populate the labels on the second page (or on Postback) based on the User's log in credentials after they click the "Submit" button. Or, if they don't have to click a button, just have the information complete based on the selected value of the dropdownlist control.

View 1 Replies

VS 2008 Send E-mail Without Authentication For Servers Without Outgoing Authentication

Mar 28, 2011

as topic, i need to send an e-mail without outgoing authentication becouse server hasn't outgoing authentication.. how i can do this??

View 1 Replies

Forms :: DataBinding Only Works Under Certain Circumstances?

May 23, 2011

I have a Windows Forms which contains a whole bunch of different text items on TextBoxes, Labels, and ComboBoxes. I then catalog what is written in these Textboxes and selected in these ComboBoxes in XML files so that they can be reopened later. Because what goes into the Textboxes and ComboBoxes are physical quantities, they have units (for examples "Inches," or "Lbs," etc.) which are the text of the Labels themselves. Multiple quantities share similar units, so I don't allow the user to change each one individually, but instead change a unit globally (for example, all weights in "Kilogram" instead of "Lb").

The units themselves are Public Properties of a separate class which I named "MyDBClass". The properties raise events when they are Set, so that objects data-bound to them change as well.When I initialize the main Windows form, I instantiate a class of type "MyDBClass," set all the unit defaults ("LengthShort = mm," etc.), and create a databinding for the Labels to the "MyDBClass" properties (e.g. ctrl.DataBindings.Add("Text", MyDBClass, "LengthS") ). From then on, the only way the user can change the units is to use my MenuStrip and select "New" (which erases all text and sets the MyDBClass properties back to default), use the MenuStrip and select "Open" (which opens an XML file, reads the "Unit" elements in, and uses them to set the MYDBClass properties), or use the MenuStrip and select "Change Units" (which brings up a dialog with a handful of ComboBoxes containing possible units, and then sets the properties of the MyDBClass based on what the user selected in the dialog).

Having said ALL of that, I can finally get to the problem- one of my units ("SpringRate") does not change when the user selects "New" or "Change Units" from the MenuStrip. It will only change when the user opens an XML file. This makes no sense, as the act of opening an XML file calls the exact same code as selecting "New" from the MenuStrip (which is that is sets the properties of the MyDBClass). The label is also identical to its surrounding labels and the ComboBox which selects the unit is identical to its surrounding ComboBoxes (I tend to use Copy/Paste when working in Design mode). I even put Try->Catch blocks around the Property's Set code and the code inside the other Subs which calls it.

View 4 Replies

Forms :: Images Into RTB Works On Xp Not Vista?

Jun 30, 2009

We are creating a Chat Application for our chatnetwork, we originally made it in VB6 works like a beauty and converting to VB.NET At the moment, it joins the channel fine, nothing wrong with this displays everything it needs to however we are in the process of showing emoticons.While we were on XP in debug mode and release mode, the emoticons showed.Once we moved the compiled version over to Vista Home and Ulitmate the emoticons would not show, we have looked and looked all over google and have not come to a conclusion, today we even moved the whole Project folder over to Vista, ran it in debug mode, and the images still wouldn't show in the RTB. Works fine in XP but not Vista?

View 7 Replies

.net - The Intended Purpose For <app Name>.exe.config File In A .NET Forms App?

Sep 21, 2010

I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. framework even prevents this by not offering classes/methods to do so). Therefore, configuration is written to XML files using a..."As far as I understand, this is not true. I don't know about .NET 1.1 preventing this, but I remember in my last project that I did write configuration values to that file (I saved GUI contents there). My project was a small prototype, so maybe I did it wrong, but I do not think so...So what is the intended purpose of this file?

View 3 Replies

Forms :: Save Data To User.config That Is Not Bound?

Sep 23, 2009

I would like to commit the data put in a checkedlistbox to the user.config. I have found a way to commit them to my.settings but no matter what Save() method I call, it does not commit the new data (that is not bound to a control, through the propertybindings) to the user.config, either immediately or when I shutdown the application. Which means, when I loop through the settings when the application starts back up, the data is not there to be added back to the checkedlistbox. I have put save methods in the formclosing events as well as when the data is created in the my.settings. using my.mysettings, my.settings and my.settings.default. Thank you in advance for your input.

This first method is a called when a button is pushed. it checks the text and then calls the next method (AddProperty) which should add the property to my.settings and save it to user.config, but my understanding is that it is not written to the file till the applicatoin closes.

[code]...

View 5 Replies

Make A Database Of All The Xbox Live Arcade Arcade Games On The Xbox Live Marketplace?

Jun 16, 2010

I want to make a database of all the xbox live arcade arcade games on the xbox live marketplace, I need to parse an xml file and add the needed data from the xml node into a datagridview.Here is the xml file i need to use to grab links and other data about the game:

[URL]

Being the noob I am it took me about 6 hours to figure out how xml works and to write some code for what i need to do.

Here is what i came up with:

'for grabbing the name of the update
Public Sub updatename()
Dim xmldoc As New XmlDataDocument()

[code]....

That code works fine.Now when i add another column to the datagridview called "update size" i want to know how to add the grabbed data from another sub i made to the new column.What would the code be for adding the strings for the new sub into the seconds column? the first was, DataGridView1.Rows.Add(str)" . So what would the second be ?Also another question i have is how do i put an image in an imagecolumn by a web link, not a local picture.

View 5 Replies

Asp.net - Getting Configuration Settings From Web.config/app.config Using Class Library

Mar 26, 2009

I have a class library (Named ADI), that needs some configuration settings from the project using it (like connectionstring, filesystem locations etc).

I want to define these settings in my Windows Forms/Web Projects App.Config or Web.Config, like other settings.

Here is part of my app.config for my windows forms application:

<applicationSettings>
<PhotoImportRobot.My.MySettings>
<setting name="ADIImageRoot" serializeAs="String">

[Code]....

View 3 Replies

C# :: Validate Dot Net Application Config File(ex, App.exe.config) On Console?

Jan 18, 2010

is there any tool to validate configuration file?

View 1 Replies

Code Works In A Windows Forms Application, But Not In A Windows Service

Jan 19, 2010

I'm porting code that I wrote for use in a Windows Forms application to a Windows Service, but for some reason, the code that worked in the Windows Forms application is now throwing errors in the Service

View 7 Replies

Asp.net - Class Needs Info From Either The Web.config Or App.config

Jul 6, 2011

Our main application has both a asp.net and winforms component. There is a class that is used by both sides and needs info from either the web.config or app.config files. The class itself does not know if it's on the client side or on the web server (at this point). We are getting errors when it's attempting read app.config when it's on the web side. Is there a way for the class to tell if it needs to read web.config or app.config?

View 1 Replies

Link From Button - When Sheet1 Is Selected, It Works, But When Sheet2 Is Selected, Not Works

Jan 5, 2012

I have a spreadsheet with this code:

'insert link
sheet1.Hyperlinks.Add(sheet1.Range("P1"), "http://http://www.vbforums.com", "")
the code of the button (ribbon)

[CODE]...

When I press the button, it connects to the web site. when the sheet1 is selected, it works, but when the sheet2 is selected, not works, why? the path is sheet1,What's wrong?

View 2 Replies

Code That Doesn't Works Runtime But Works Step By Step?

Jun 26, 2010

this is my code:

Dim WB As WebBrowser
WB = GetPage("http://speed.travian.ir/a2b.php?z=" + VillageID.ToString + "&c=" + Type.ToString + "&" + AttackParams)

[code].....

View 9 Replies

Can't Get Sql To Output When Go Live

Sep 30, 2009

I have this visual basic that calls a stored procedure. When I run it through visual studio on my local machine, it works fine. However when I move it to a server, it doesn't output any data from the sql. The page still loads, it just doesn't show any data in the labels. Any ideas why? [Code]

View 7 Replies

DateTime In SQL Is Different Than Where Live

May 6, 2009

My SQL server is running from the west coast and I live in the east coast, I am running a VB.NET code and to check for items within the right time I have to use DateTime.Now.AddHours(-3).

Now thinking about it, when the daylight savings happen, it will only be DateTime.Now.AddHours(-2), how do I go about fixing that from now? Is there a way to fix that?

View 4 Replies

Live Web Cam Streaming?

Sep 17, 2009

i`m trying to stream my webcam video to the internet so i can be able to see my web cam at home from my office.Is it possible to do this using VB.net or i have to switch to ASP.net?

View 1 Replies

Use Live Sdk In Program?

Feb 29, 2012

I need help about using live sdk in vb 2008

View 3 Replies

Using Live Sdk In Vb 2008?

Feb 29, 2012

I need help about using live sdk in vb 2008 how to start?

View 3 Replies

Getting Live Status From Other Application

Dec 15, 2011

With my application i call an external commandline tool that converse iso's to other fileformats. Right now i just call the iso converter and it will run in the background, when you would run the iso converter via commandline you see what it is doing, but in my application it just runs in the background.

Right now it only gives me the status after the isoconverter is done in a textbox, how could i change this so i can see live status? like i would see in the command line tool?

This is the code that i'm calling to execute the isoconverter.

[code...]

View 3 Replies

Get Video Live From Ip Camera?

Mar 18, 2012

I'm using quicktime into my project to get video live from ip camera now i need to start recoding this video

View 2 Replies

How To Do Live Element Editing

Jul 17, 2011

I am making an application that gives the user the ability to change the appearance and characteristics of a website locally. I am fully aware of how normally you can set values through ID's and Name's, but in this case the value I intend to change has neither of these things. Here is the code I want to edit:

<!--/** * Inferno Shoutbox Javascript Engine * Created By Inferno Technologies * All Rights Reserved * * * * * * * * * * * * * * * */InfernoShoutbox = new _ishout;InfernoShoutbox.aop = true;InfernoShoutbox.initiate('index','600','1','0','0','0','3','200',parseInt("5") * 1000);InfernoShoutbox.idle = true;-->

The part of the code I want to change is the '1000' which is in bold and underlined. I want to change it to 999999999 on the click of a button.

View 3 Replies

Live Chat Code ?

Dec 16, 2010

I need to integrate live chat in my website...How to to get the code for this please? vb codes if its possible...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved