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


Top 5 Contributors of the Month
david stephan
Fauzul Azmi
Asad Ali
Post New Web Links

automatically aspnetdb is created in app_data folder

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
 
 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..


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

Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

  
Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

Question re. App_Data folder

  
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.

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

Contacts created in Outlook put into 'Local Failures' folder

  
We have users with Outlook 2007 sync'd to a WSS 3.0 contact lists. New contacts created in WSS appear fine in Outlook. However if a user "Creates new contact from same company" (within outlook) or drag/drops contacts from outlook personal contacts to sharepoint list, the contact always gets put into the 'local failures' box. There have been posts about checking any contact website address is entered correctly, this is not the issue.  During outlook send/receive, these errors appear: Task 'SharePoint' reported error (0x81020014) : 'Failed to copy one or more items. For details, see the log file .' Task 'SharePoint' reported error (0x00000000) : 'OURCOMPANY Intranet - COMPANY Contacts - Failed to copy one or more items because some are not compatible with SharePoint. The failed items were moved to your Local Failures folder and replaced with copies from the server. If you need assistance troubleshooting items in your Local Failures folder, a Help topic is available at the following address: http://go.microsoft.com/fwlink/?LinkId=70300. For details, see the log file .' The microsoft link is dead, so no use. Can anyone help? - thanks  

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?

Images should move automatically from a folder using c#

  

Images should move automatically from a folder using c# ......that means only one image will be there while seeing after every 2 sec the image should change how to do i tried but not getting.............plz help

Thanks

                


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.


Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

  

Hi,

Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :(

I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.


Regards, Sachin


How to acces a folder which is created within a list?

  

HI,

My collegue already created a folder "a" within a "Sample" list, which i can see in Sharepoint designer 2007.

When I tried to copy some .js file into it, it gives error as 'Object reference...".

So I want to know that how to access folder through web application/site in which it resides.

Or there is any other way to access it?

Thanks in advance.

Regards,

jayashri


Content Organizer - Target Location - Automatically create a folder for each unique value of a prope

  

I would like to create a content organizer rule to route documents from the drop off library to their final location in the document library.

I also want to create a subdirectory based off a metadata field, so that a folder gets created for each year.

There is a metadata field called "Document Classification Year".

I check the chebox to  "Automatically create a folder for each unique value of a property" and choose "Document Classification Year" as the field.

For "Specify the format for the folder name:" %2

I was hoping this would create a folder called "2010" if the meta data field "Document Classification Year" was entered as "2010".

But it creates TWO folders. The first folder it calls "Document Classification Year", the SECOND folder it calls "2010".

I don't need a folder called "Document Classification Year"! Just the folder "2010".

Can this be achieved without the content organizer??

 


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



"An attempt to attach an auto-named database for file G:\\project\\sasystem\\App_Data\\aspnetdb.mdf

  
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    public void showdata()
    {
        if (txtsname.Text != "" && txtboard.Text != "" && txtcity.Text != "" && txtlocality.Text != "" && txtadmnfees.Text != "")
        {
            if (dlstclass.SelectedIndex != -1)
            {
                using (SqlConnection con = new SqlConnection())
                {
                    con.ConnectionString = ConfigurationManager.Connecti

Automatically redirect to HTTPS and check if SSL is active

  

Hello,

I've set in the web.config:

    <!-- User Authentication -->
    <authentication mode="Forms">
      <forms loginUrl="~/Page/View/Content/Login.aspx" timeout="2880" requireSSL="true" />
    </authentication>


This works fine. If there is no ssl connection, the login form doesn't continue. But I would like to check if ssl is active (in codebehind) and, if it's possible, to automatically the user to the https page if he's currently on http. (I could do this job by manually redirect with page.response("https://url.../login.aspx"); but this is not really generic. For example if the webapp is moved to another domain it doesn't work anymore... I'm looking for something like: FormsAuthentication.RedirectWithSSL(); or so... :D)

Regards,
Chris 



How to access a new database ( which i created ) in isqlplus ?

  

Hi.,

I created a new database with the help of Database Configuration Assistant !

I created with the scott account

Now i'm not able to connect to the database with the connect identifier with the scott account

The error i get is.,

ERROR - ORA-12154: TNS:could not resolve the connect identifier specified.

Plz help !



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