.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

Question re. App_Data folder

Posted By:      Posted Date: September 10, 2010    Points: 0   Category :ASP.Net
 
I have authentication on my site and it works fine on my local machine but it has stopped working on my live one. Basically once a user logs in, if the role he/she has is listed in web.config as being "Access denied" then it redirects them to a page where they are given an error message.On the live on it doesn't redirect the user, it brings up a page with "Access denied creating App_Data subdirectory etc.." on it.I noticed that there is no  App_Data folder on the live site, but there is on my local pc (with a ASPNETDB.mdf file in it). So I created an App_Data folder on the live site and now I don't get the "Access denied " error but a timeout error instead.I presume this is because the live site does not have the ASPNETDB.mdf file.I am wondering for user authentication does this file have to be on the live site, could someone have deleted it? If so can I copy the one from my local pc to the live site?I hope I am making sense, thanks for any replies.


View Complete Post


More Related Resource Links

Create user is creating aspxxxx.mdf database in my app_data folder

  

I had already setup roles for my pages and requirements call for ability to manage and create users.

So i was looking at code that allows you to do so using membership, even though i got the page to work, it was creating a database in my app_data folder.. i already have SQLExpress setup with the asp schema, but cant figure out how to get my application to use that instead of creating the db in the folder?

What am i missing or doing wrong?

I have the following setup in my web.config file..

		<authentication mode="Windows"/>
		<authorization>
			<deny users="?"/>
		</authorization>
    <membership>
      <providers>
        <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        connectionStringName="connectn"
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        applicationName="MyApplication"
        requiresUniqueEmail="false"
        passwordFormat="Hashed"
        maxInvalidPasswordAttempts="5"
        minRequiredPasswordLength="7"
        minRequiredNo

automatically aspnetdb is created in app_data folder

  
 i have used membersip, roles, profile in my website. i have moved all the tables and sps to the new database i am using. to avoid creating aspnetdb. i use sqlexpress and visual web express. My problem is aspnetdb is automatically created event though i have not used 'localsqlserver' specified anywhere in the web.config file.  I not able to understand why aspnetdb is automatically created in the app_data folder. Any ideas..

Securing files using Handler and App_Data folder

  
HiI have secured some files on my webserver by putting them into the App_Data folder in the root (I do not have the option to secure folders using the ASAPI filter)The user gets access to these files by requesting them through a handler, fx. by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpgNow, I want to make all the content in a specific folder called "Members" (a single subdirectory of the App_Data folder) available only by passing a specific password. That is by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpg&password=xxxxIn my Handler.ashx I have written some logic seeking if InStr(context.Request.QueryString("file"), "Members") = 0 before sending the file. If inStr <> 0 a password is required.Is this a good way to secure a folder in and its content? Is there a way of getting access anyway, like using some kind of "sub-directory" line in the path (the same way as you can request parent directory by using "../../Myfile.jpg)? I know there will be a problem if someone fx. legitimately tries to access the file App_Data/Members.jpgThanks in advance!-Jesper

Create App_Data Folder Grayed Out?

  

I have a few questions regarding the "special" ASP.NET folders in Visual Studio web projects.

  1. Adding an App_Data folder in Visual Studio is present, but grayed out in my C# web project, why?
  2. What are the meanings of the various ASP.NET "special" folders?
    • App_GlobalResources
    • App_LocalResources
    • App_Data
    • App_Browsers
    • Themes - I know this is used to contain stylesheets for a particular theme and is then specified in the web.config or page (if I remember right).
    • App_Code - Were these classes that were pre-compiled?
  3. Do these ASP.NET folders retain their special meaning if you manually create a folder with the same name instead using the "Add ASP.NET Folder" feature in Visual Studio?

Error to Add a Database to a Visual Studio 2010 Project via the App_Data Folder

  

I am trying to add a new database via the App_Data Folder and I receive an error described below.

When I attempt to add ANY TYPE OF SQL SERVER DATABASE through the App_Data folder I receive this error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2008 to function properly.  Please verify the installation of the component or download from the URl."

I can create a db via SQL Server Mgmt Studio, it connects fine, and I can see tables.

Visual Studio- Server Explorer connects fine to the Database, I can see the tables.

Im running XP SP3 w/ Visual Studio 2010 and SQL Server 2008 R2 Developer.  I had previously removed SQL Server Express.

Why cant I access the database within my project, when Im able to connect to this fine within Visual Studio Server Explorer?


Error to Add a Database to a Visual Studio 2010 Project via the App_Data Folder

  

I am trying to add a new database via the App_Data Folder and I receive an error described below.

When I attempt to add ANY TYPE OF SQL SERVER DATABASE through the App_Data folder I receive this error "Connections to SQL Server Files (*.mdf) require SQL Server Express 2008 to function properly.  Please verify the installation of the component or download from the URl."

I can create a db via SQL Server Mgmt Studio, it connects fine, and I can see tables.

Visual Studio- Server Explorer connects fine to the Database, I can see the tables.

Im running XP SP3 w/ Visual Studio 2010 and SQL Server 2008 R2 Developer.  I had previously removed SQL Server Express.

Why cant I access the database within my project, when Im able to connect to this fine within Visual Studio Server Explorer?


How to place a MYSQL database in my ASP.NET site App_Data folder?

  

Hi!

How to place a MYSQL database in my ASP.NET site?

In what format I produces the file to my APP_DATA
database folder to place it.
How to build CONNECTION STRING to  database located in APP_DATA
I created a site  conncted with a LOCALHOST database.
Now I want to import it into my website folder APP_DATA
Please help.


Question regarding folder management

  
I'm attempting to set up a sharepoint site for my work and I'm having some issues. I'm looking to manage documents in one folder but be able to view (or insert) that folder into four other folders without having to manage it in four places. Due to site permissions, I am unable to just have an all folder so I'm hoping there is a way I can administratively manage this folder and have it appear in four subfolders (not a subfolder of the one I am attempting to manage). Is this possible? Can anyone help steer me in the right direction?

I need help with adding membership tables to app_data folder database

  

The following code is used to add the asp membership tables to an already existing database instead of creating a seperate database for membership and having two databases in the application.

aspnet_regsql.exe -S .SQLEXPRESS -U username -P password -d databsename -A all

It works fine by adding the membership tables to the existing database that is located in the c drive, program files  sqlserver folder.

But my database however is not in the c drive but located in my asp website app_data folder, so the above code does not give any error and the tables are not added after I run it.

Please how can I now add the membership tables using the above code when my database is located in the website app_data folder, thanks



Sharepoint Explorer View - Different Folder Icons Question

  

I have multiple XP pro clients accessing my sharepoint server and utilizing Explorer View on Document Librarys to access and modify documents and folders.  I have 2 users whose folders show up differently than the others and have some strange capability limitations that the rest of my user base does not experience.  I tried searching around for a solution or at least an explanation to what is happening on these 2 machines.  The  folder icon is different on these two machines and shows 2 small documents over teh folder in the icon.  What does this mean?  How do i fix it so that this machine has the same folders and capabilities as everyone else?  Thank you in advance to any who can shed light on this subject.  I tried to post a screen shot, but this forum does not allow pictures.

 

Thanks,

Axiom

 



Some basic MVC question

  
  1. In regular asp net I can run (debug) the application but I can either "view in browser" that gives me the option to view the application and write code on same time.

In MVC I can't find this option.

  1. What is the basic DATA MODEL for working with SQL DB.

I mean with no any framework (entity framework, Sub sonic, Link to SQL etc')

I look for basic application that works with data but with no fw.

  1. What is the popular DB framework that working with data.
  2.  I am looking on  mvc series

Like

C# Soup To Nuts  (the best series ever)

http://blogs.msdn.com/b/wsteele/archive/2007/01/29/c-soup-to-nuts-webcast-links.aspx

I watch some of the MVC video, seems that the music store is good but I have to wait to the other part.

Does any one know and recommend   a Microsoft MVC tutorial?

https://msevents.microsoft.com/CUI/AdvancedSearch.aspx?culture=en-US#advsearchloaded

 

Thanks!

 


Web Site to Web Application Question

  

I've been building web sites and for my next project I will be creating a web application.  I use a 'BasePage' class in all my projects but, since web applications do not contain the 'App_Code' folder, what is the best place/practice for the 'BasePage' class?

Thanks,

TML


connection string question from a newbie

  

when publishing  in the webmatrix dialogue it asks for "destination connection string" for my "database.mdf"

I was not sure what it was so I pasted this from my web.config file :

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\database.mdf;Integrated Security=True;User Instance=True

it all published ok, but wont run, so I guess it has somthing to do with this connection string or some kind of configuration issue.

My question is this, What should go in the field for "Destination connection string"


Security Question Answer Retrieval

  

I know there is a method built in for retrieving the encrypted password, but how do I retrieve the encrypted security answer?

What I want to do is have a member profile update screen that the end user can update their password and security question and answer. However, when they get to this page, I want to already be showing the security question (the easy part) and its answer (the not so easy part).

I have updated web.config with passwordFormat=Encrypted and have added a machineKey with the generator (forgot the link, but located on eggheadcafe somewhere).

I haven't done ANYTHING yet, since I already have a user store with hashed information. I wanted to get some functionality done before publishing, wiping the store and recreating users (only a couple developers).

Thanks,
Kerry


Very Basic Question - Error message running first page

  

Hi Everyone,

I am running Windows 7 and I have gone into Control Panel and activated all of the IIS Functions.

The web application I am running was downloaded from the net (and has worked on other machines previously).  Once I downloaded it, I moved it into C:/inetpub/wwwroot/code/main.asp

I am a bit of a novice at this!  But I am hoping someone can point me in the right direction!

 

I get the following error when I try and run the web application through IE:

"An error occurred on the server when processing the URL. Please contact the system administrator. If you are the system administrator please click here to find out more about this error."

(When i click the "click here" button it just goes to the IIS site).

 

Appreciate any help I can get!

Thankyou!

 

 


C#, LINQ: (List<>) Question???

  

Hi Everyone,

I have a strange problem:

 

There is an entity (Table) called "Filters" in my .edmx which has all my tables and stuff in it (to use it for LINQ queries)

I have created a class called "CustomFilters" which inherits "Filters". So now my cutom class has all the properties of the original "Filters" class (table) and 1 more additional property that i wanted which is a List of "CustomFilters":

List<CustomFilters> children = new List<CustomFilters>();

Now i get all my records into:

List<CustomFilters> theOriginalList = new List<CustomFilters>();

NOTE: first all records are tken into a List<Filters> and then these are added into List<CustomFilters> where List<CustomFilters> for children of that record is added, and then children of the child records, and so on......

so now, every record is an instance of CustomFilters which has a property named "children" which is a list again; and each child again has instanaces of "CustomFilters", and each instance again has children...and on and on and on.....

(basiacally its a data source for a treeview in my silverlight control)

every thing is good and working as expected.

but:


linqdatasource parameters question

  

Hello,

I'm currently getting to know the linqdatasource control. What would happen if several WHERE parameters are added to the linqdatasource control declaritively in the aspx page but no WHERE clause is defined? 

1. is there any issue with setting up multiple WHERE parameters in the aspx markup for linqdatasource but then deciding which ones actually get used at runtime by setting the actual WHERE clause at run time? Would the unused parameters simply be ignored and cause no issues?

2. when you need to modify WHERE clause or WHERE parameters at runtime do you need to do so in an event handler? such as linqdatasource.selecting?
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.linqdatasource.selecting.aspx
I see from the above link it is possible, but is that the standard way to handle controlling filtering in code behind for linqdatasource?

2b. if you use an event such as linqdatasource.selecting to add where parameters and/or modify the where clause in code will that also break the builtin sorting and paging support of the linqdatasource with a gridview? 


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend