I created a web application in VS 2015. It has basic authentication build in and is functional.
Where is the data for account authentication stored?
There are no files in the App_Data folder where the documentation indicates it should be located.
I'm looking to move the data to a SQL Server to be mixed in with other outside data. But I have to find the existing files first.
Thanks for any help.
Use any of these approaches, to access database files.
Click Show all files button from the toolbar on top of solution explorer pane.
Right click App_Data folder from Solution Explorer and select Open Folder in File Explorer from menu.
Identity database will be created in C:\Users\YourUserAccount\ and database name look like aspnet-YourApplicationName-Guid id.
Related
I have a webshop in ASP.MVC.
The solution consists of 2 projects - a web.frontend and a web.admin.
In web.admin, file upload is possible. These files should be accessible from the web.frontend to show in browser.
I have tried tons of different C# methods to various paths...
Please provide me a way to put shared files where the browser can access them too.
I've tried placing the files at the .sln root - but the browser gives me an error: Not allowed to load local resource.
So somehow, the files should be placed in the web.frontend wwwroot? from the web.admin project?
Your only choice here is using virtual directories. In full IIS, that's a pretty straight-forward affair. You simply add a virtual directory to the site in IIS and point it to the location on the filesystem to where these files are stored. Then, you reference the files using this virtual directory in your HTML. For example:
Foo
The same is required in development, but the procedure is a bit more circuitous with IIS Express, since there's no GUI management. To add a virtual directory to your project in IIS Express, you'll need to go to File > New > Web Site... in Visual Studio. Click the Browse... button, and then click on the Local IIS tab. Select the site for your project, and then click the icon at the top-right that looks like a yellow folder with a red asterisk. Type an alias name (this is what you'll use in your HTML) and then browse to the location of your files on the filesystem. Uncheck Create IIS application and then click OK. Then, click Cancel and Cancel again. You're not actually going to create a new website; it's just the only way to get to this area where you can add virtual directories. Rinse and repeat with your other project.
I have deployed my application to server as below (from here):
To deploy an ASP.NET MVC application
In Visual Studio, open the project that you want to deploy.
In Solution Explorer, expand the References node.
Select the following assemblies:
System.Web.Mvc
System.Web.Routing
System.Web.Abstractions
In the Properties window, set Copy Local to True.
In Solution Explorer, right-click the project and click Publish. The Publish Web dialog box is displayed.
In Target location (http:, ftp:, or disk path), browse to a local folder and click Open.
Select either Replace matching files with local copies or Delete all existing files prior to publish.
Under Copy, select one of the following, depending on your needs: Only files needed to run this application, All project files, or All files in the source project folder.
If your application contains files in the App_Data folder such as database files, select Include files from the App_Data folder.
Click Publish. All the files that are required in order to deploy the application are copied to the target folder.
Afterward I have errors connecting database which was about loging failure which fixed. Then I face 500 internal server error.
I tried to enable debugging options and show errors which did not worked(here are the details).
I tried to do some blind tries, e.g. I created a control/view which its view just simply display an static output without any logic however it is still have 500 error.
I don't know how to fix this and how to continue debugging this project. What can I do know?
I have a Winforms application (checkers game) which have a local DB (using SQL Server Express)
to save the registered players and their scores..
I'm trying to create an installer for this app by this tutorial
Everything is fine, but when I'm trying to add the players I'm getting a SQL error
that says the database wasn't found.. so how can I add the local DB (.mdf file) to the installer?
Provided that the conditions to use local DB at the client machine are OK (see LocalDB deployment on client PC), in the deployment project you can just add the database files to the application folder (Choose File System Editor in the solution explorer when the deployment project is selected.
Side note: Are you aware of the fact that in VS2012 the MSI deployment project template is deprecated?
Addition: And it's back in VS 2013!
This is my workaround in wpf. I think solution is the same in Winform:
Make your mdf file "content" by right clicking on that and select properties. In "build action" menu select "content". And in copy to output directory select copy always
In Solution explorer go to Properties/Settings.Settings and put connection strings in a field (notice that name of that must be the same as it is in your App.config (eg in wpf) like picture below it will create).
Right click in your setup project and Add->Project output-> then select content files.
I have an application that stores images uploaded by user. Those images goes to content/images/upload. Problem is that if i published without the skip extra files on destination, all user uploaded content gets deleted. Im pretty sure im doing it wrongly, which would be the best approach for this situation ?
im worried about losing user generated content this way misconfiguring an option in publish.
One approach I've used is to move the physical path of the "upload" older outside the application folder structure. I'd use an IIS virtual directory to mount the folder to the application. For example, if the folder structure currently looks like this:
c:\inetpub\
wwwroot\
content\
images\
upload\
You might change it to this:
c:\inetpub
upload\ <-- must be manually created on the web server
wwwroot\
content\
images\
You'd remove the upload folder from the web application in Visual Studio. Log into the webserver and create the folder under inetpub (could go anywhere, really). Then go into IIS manager and create a virtual directory called upload that points to the c:\inetpub\upload folder.
The upload folder is no longer part of the Visual Studio project so the "publish" feature won't touch it.
I have a website in vs2008. I have created a crystal report which works fine in the DEVELOPMENT environment. But when I publish my website to IIS, the report is never displayed. It just displays a blank page. Can anyone tell me how to resolve this issue?
Thanks
If you installed your application in a website different from Default WebSite, try this:
Solution
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
or in IIS:
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot inside the new website.
Cause of the problem
Using client tools (debug window of your browser) or server tool (IIS log) you will find that some required Crystal files like crv.js and style.css are not served. That's because these files are placed by CR installer in wwwroot\aspnet_client folder, but they cannot be reached from other websites installed on the same machine.
I can see that you use different versions of software and different configurations, but I think you have the same problem.
Make sure Folder "2_0_50727" exists at C:\inetpub\wwwroot\aspnet_client\system_web
or your SiteRootFolder\aspnet_client\system_web
if not exists copy the folder "4_0_30319" as "2_0_50727".
If you are using Submit button for viewing the report, make sure you effect a full postback on submit button click. You will find that all pages in the report will work perfectly fine.
Note: Use Trigger with Update Panel to Effect the Full Post Back (The Control ID of the trigger should be the ID of the button).
Perfect! The solution is to work on IIS this way:
Copy aspnet_client folder from c:\inetpub\wwwroot folder to the new website root folder.
OR
Create a virtual directory called aspnet_client that points to c:\inetpub\wwwroot inside the new website
Thank you so much
You need to install the merge modules on the web server. You can download them from Here
Check the Crystal Report Run-time version, for example if you install version 13.0.1 and your Visual Studio uses 13.0.2 the report will display but not data will be displayed.