Security :: Data Connections Strings / Web Config?

Apr 4, 2010

I am helping a club create a site that has a password protected "members only area". I have never done anything password protected. I used VWD and created the user names and passwords. Apparently using the AspNetSqlProvider. The site and password protected area work great when tested locally. The problem is when the site is uploaded to the hosting company, the login area will not work. I found that I had to create an SQL database in the appropriate area of the hosting company. The login still won't work. I am thinking that I have to create a connection string in the web config file. The problem is - when I tried that the site wouldn't work when I tested it locally. I really need lots of help with this part.

View 5 Replies


Similar Messages:

Web Forms :: Retrieving Web.config Connections Strings?

Feb 24, 2011

I nearly completed my project and was about to put it out to be run. My boss was going to make a minor change to the connection string and then put it out there. In short, my application was running off a dummy database, while the real database was out there. I have the connection string comiple and built through out my project in the aspx pages and the cs pages.

However, my boss wants to be able to change a single connection string in a single place, essentially in the web.config file. I'm fine with that, but I don't know how to access the connection strings stored in the web.config files. How do you do that? So far, I've only created a new connectionstring in my code on each page. I've told him you could do a "find and replace" on all the files but he doesn't want to do that. In short, he wants to change the connection string the same way he does all the other projects he works with, php, vb and etc.

how do you access the connection strings stored in the web.config file programmatically?

View 2 Replies

Security :: Hashing Web.config Credentials / Connection Strings

Jun 23, 2010

I want to apply some better security measures to an existing web application. Currently, my connection string contains the user name and password in plain text. I'm also using a custom membership provider, which stores user names and passwords in the web.config file as plain text [URL] I would like to secure this information using an algorithm such as SHA1.

View 1 Replies

Security :: Saving Stored Procedure Names And Connection Strings In Config Files

Aug 3, 2010

I have heard that saving connection strings and stored procedure names in web.config file of our application is not safe. It is a good practice to store the connection string in a config file rather than as a hard coded string in our code and if we need to change it,then it makes our job easier. how to protect our code in web.config?

View 4 Replies

Security :: Connections Betweeb Users And Any Othere Data?

Feb 19, 2011

i'm a real beginner, so my questions may sound rather stupid but i did not google anything on it.

Suppose I create a standard mvc 3 application having an authentification system. There are the questions:

1. As I understood the information about users is stored in App_Data folder. Is there a way to store it database? obviously, there should be one,

but i cant figure it out .

2. Suppose I want to link a user with entities belonging to him (like articles in a "shared" blog, photos, whatever), How do I do this?

the standard MS tutorial (MVC music store) doesnt cover neither of these questions which are rather basic.

View 1 Replies

C# - Encrypt The Connection Strings In Web.config?

Dec 20, 2010

I'm trying to encrypt the connection strings in my web.config. I'm following:

http://msdn.microsoft.com/en-us/library/2w117ede.aspx

however when I get to the part with the command:

aspnet_regiis -pe "connectionStrings" -app "/MyApplication" -prov "MyProvider"

it keeps complaining:

"The configuration for the virtual path '/MyApplication' and site 'Default Web Site' cannot be opened

Failed to map the path '/myapplication'
Failed!

I'm fairly sure I've followed the instructions correctly. I created the project named 'MyApplication' directly in the 'C:' root.

Perhaps I should be following a different set of instructions?

View 3 Replies

C# - Two Connection Strings In Web.Config And Switch Between Them In Code Behind?

Nov 19, 2010

How Can We Have two Connection Strings In Web.Config And Switch Betweeen Them In Code Behind? when i add two connention strings in web.config so an error appears that tells us u cann't add two connection strings in web.config. i want the upper job because i have 2 databases and i want transfer data from another to the other one.

View 4 Replies

Storing A Variable Collection Of Strings In Web.Config?

Aug 25, 2010

I would like to store a collection of strings in the web.config. This collection would vary in size over time. I would like to be able to pull all of the strings in the collection into an array or collection in code. (.Net 4, asp.net)
i.e.

<customCodes>
<VendorCode vendorName="Name1" code="1234567891234567891324567987ddd" isActive="true"/>
<VendorCode vendorName="Name2" code="1sadfsadf1234567891324567987ddd" isActive="true" />
<VendorCode vendorName="Name3" code="123456789dfadfdsaf3324567987d32" isActive="true"/>
</customCodes>

I could use appsettings with the strings all in one value but I would like to seperate it out for organizational reasons. Not using the key/value pair complicates things a bit. I am now getting a message that states "you can't have duplicate elements in a section"

View 2 Replies

Web Config - Where Should Connection Strings Be Stored In A N-tier Application

Sep 29, 2010

I have an ASP.NET project which is pretty n-tier, by namespace, but I need to separate into three projects: Data Layer, Middle Tier and Front End.

I am doing this because...

A) It seems the right thing to do, and

B) I am having all sorts of problems running unit tests for ASP.NET hosted assemblies.

Anyway, my question is, where do you keep your config info?

Right now, for example, my middle tier classes (which uses Linq to SQL) automatically pull their connection string information from the web.config when instantiating a new data context.

If my data layer is in another project can/should it be using the web.config for configuration info?

If so, how will a unit test, (typically in a separate assembly) provide soch configuration info?

View 3 Replies

C# - Switch Between 2 Connection Strings In Web.Config (Activate One For DBML)

May 21, 2010

I have two connection strings (both in Web.Config: CS_Local and CS_Production) for my DBML (Linq to SQL). In my Global.Asax/Application_Start I run some production preparation methods if the request is non-local (!HttpContext.Current.Request.IsLocal). Within that part, I'd also like to change the current connection string used by my DBML from the standard CS_Local to CS_Production.

View 1 Replies

Access :: Multiple Connection Strings In Web.config File

Jan 12, 2010

Is that possible to add two connectionstrings in web.config and Can I call those two web.config in my aspx.cs file?

View 3 Replies

Configuration :: Web.config Connection Strings For Development And Production Environments

Apr 15, 2010

I have seen the examples on how to switch between connections strings for development and production enviroments. My web.config also calls out a connection string for <roleManager and membership><providers>. Can this be setup to switch between the two connection strings?

View 1 Replies

Configuration :: Two Connection Strings In 4.0 Web.config File Using Ms Sql 2008 Express

Jan 21, 2011

I would like to use both of the connection strings in the same web.config file how can I do this I tried this yesterday it worked I called it a night, then this morning I got this. The error being on line: 10 Parser Error Message: The entry 'ApplicationServices' has already been added.

Line 8: <add name="ApplicationServices"
Line 9: connectionString="Data Source=Mysource;Initial Catalog=travelatlantic;User ID=MyID; Password=MyPassword;" />
Line 10: <add name="ApplicationServices"
Line 11: connectionString="Data Source=MySource;Initial Catalog=travelatlantic2;User ID=Myid; Password=MyPassword;" />
Line 12: </connectionStrings>

View 8 Replies

Security :: By-pass Authentication For Intranet Connections?

Feb 26, 2010

The company I work for has a web app running on IIS that has been strictly internal (uses a port other than 80 not accessible to the internet). Recently we started using mobile devices and need to access it over the internet. So I simply made it part of our company web site and secured that portion using forms authentication. The problem is that it is also our home page in the office and it is a pain to be logging in several times a day. In fact some of the staff are irate they have to login in at all when at their workstations. Is there a way to by-pass authentication when the referrer is http://servername/ and still enforce it when accessed via http://www.domainname.com?

View 1 Replies

Security :: SQL Express Handles Membership/Roles Connections Differently To The Full Versions Of SQL?

Jan 15, 2010

I have incorporated the asp.net membership and roles feature in my web app on my local dev setup that uses SQL 2008 Developer edition, all works as it should.

My remote system uses SQL 2005 express and I went through the process of creating the ASPNET membership tables via the "aspnet_regsql" command to my remote target database. I then created a few users, adjusted my app connection strings accordingly and uploaded.

My login page uses the "login" server control and when I try and login using credentials from one of the previously created users I get a "Your login attempt was not successful. try again." error. I know the users are in the DB as I can see then via the SQL Management studio on the remote DB. I have triple checked the username/passwords and I am definately entering the correct info. The connection strings are correct as the initial page renders content from another table in the DB. I am getting no errors.

My best guess at the moment is that SQL Express handles Membership/Roles connections differently to the full versions of SQL?

View 6 Replies

Security :: Forms Authentication And Query Strings - .Net 4.0 Iis 7?

Oct 21, 2010

I'm completely lost as how to resolve this issue, I'm not sure if it's occurring in iis or it's my .net

I have forms authentication and a login.aspx page using iis 7

I'm trying to achieve the following url:[URL]

How do i resolve this issue? I really need the id to be used as part of the login process

View 1 Replies

Security :: Windows Authentication - Get Role Security In Web Config File To Coincide With Controls

Apr 6, 2010

We use Sharepoint to control our websites. We build the sites, then load them into the sharepoint server. My question is if I use windows authentication, how can I get my role security in my web config file to coencide with the asp.net controls that use the Forms authentication. Is there a differenence? Our security uses a session variable for security but there is no where to set up their permissions except in active directory. I hope this makes sense because I would like to implement the LoginView with Role groups but how can I give them the role="administrator"? Do I have to go into active directory and give them these permissions(would take awhile due to the size of the company)? Or do I have to set up priveladges in the web.config file for each user(difficult I think)?

View 5 Replies

DataSource Controls :: .Net SqlClient Data Provider - Connections?

Jan 19, 2010

We have developed web application using Asp.net, C# and SQL Server. However, When viewing the Process Info Tool for MS SQL Server, we see lots of processes (150-1000+) with Status = 'sleeping' and Command = 'AWAITING COMMAND' (Application = '.Net SqlClient Data Provider')The DataReaders and Connections are all being closed, but still the sleeping connections are accumulating. The problem becomes so severe that we finally get a "General Network Error" or a "Internal system error" and if we restart IIS. We have tested a lot but no success.

View 5 Replies

Gridview Arrange Strings Data Right?

Feb 12, 2011

1)Is it possible to arrane strings to the right?

2)Is it possible in case The value of the field is null to have "-" in the corresonding gridview field

View 1 Replies

Forms Data Controls :: Data Format Strings To Clean It Up?

Feb 17, 2011

I have a decimal value that is a winning percentage so will always be three digits to the right of the decimal but I dont want the 0 appearing to the left of the decimal.What format string can I use to clean it up?

I want .667

im getting 0.667

View 1 Replies

Security :: Authentication In Web.config?

Apr 7, 2010

Im uysing my custom login for user,and suppose im having a group of user who can login in.and rest of other should be deniedso how i can maintain that in web.config,

View 2 Replies

Security :: Web.config Not Working?

Feb 6, 2011

I have done forms authentication a couples of times before but this time I cant get my head around something.Somehow altough the user authenticated,the destination page does not get this.The destination page is called Approval.aspx and is located in the /Admin directory which is secured by having its own web config with those settings:

[Code]....

If I remove the <deny users="?" />,then everything works fine but obviously everyone has access to that page.I only want that the user of role Admin can access it. I have implemented the standard VS 2010 login controland the user gets to the destination page with a response redirect:

[Code]....

Why does the destination page not realize that the user is authenticated and does not treat the useras a user in role "Admin"?

[Code]....

While debugging the login page I can see that the user has the right role "Admin".

View 9 Replies

Security :: Web.config Isn't Being Created ?

Jan 8, 2011

Within my site structure there is a folder called { Account } where I only want certain users to have access to. At University, my lecturer provided us with the following instructions:

Create new website and delete the default.aspx file in the Solution ExplorerRight click on the website path at the top of the Solution Explorer window and add a new folder. Name the folder Secure.To set up the security, select Website and then ASP.NET configuration.Select the Security link and in the Users column click "Select Authentication Type" and on the page that appears check the "From the Internet" option. Then click the "Done" button.Still in the security section select "Create Access Rules" and then click on the Secure folder and select "Anonymous Users" and "Deny". Then click OK. You can now close down this window.In the Solution Explorer click the "Refresh" button and you should see two web.config files appear.I am following his instructions to the letter, but I am not getting the {web.config } for my { Account } folder ! What am I doing wrong ?

PS. Is a users table in a database redundant in ASP.NET because there is already a user's table with roles built into ASP.NET ?

View 1 Replies

Security :: Set Logged In Time In Web.config?

Jan 26, 2010

I need to set my logged in time in web.config but I do not know how? I get logged out after a while if I do no do anything in the website but I wanna be logged in for 120 minutes.

View 3 Replies

Security :: How To Encrypt Only Password In Web.config

Jan 2, 2010

i have mail setting in web.config

[Code]....

Now how i encrypt only the Password ?

View 6 Replies







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