Transfering ASP.Net Website Project From One Computer To Another - c#

Ive been working on a project on my computer and i want to transfer it to my laptop. The project is an ASP.Net Website Project in C#. I'm using SQL Server 2012 to hold my database and the Asp.net user management tables in my database also.
What's the easiest way to do this, as i have backed up my database and copied the ASP.net website folder onto my laptop and changed data source, but I'm getting a few errors, especially on the asp.net configuration page it has also removed my roles due to the transferring.

If i understood you correct, what you need is to deploy the ASP.NET Membership Database to the new project location. There are set of tools and commands that you need to use.
You would need to construct a command-line like the following:
C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync
-source:dbfullsql=" [your connection string] "
-dest:dbfullsql="c:\temp\InsertIntoAspNetDB.sql
Again the exact path and command will depend on your local configuration.
You may get more detailed information from MSDN - How to: Deploy a Database With a Web Application Project

Related

Umbraco 8 shows install screen after deploying on GoDaddy server

I have developed site using Umbraco 8 and uSkinned theme. I am able to run in my local development environment as well as local IIS. but when I deploy it to GoDaddy it shows me install screen.
I followed below are the steps.
Visual Studio Publish to folder.
Using above published folder I hosted site to my local IIS(it works on IIS)
I have created backup of database
Restored backup to GoDaddy SQL Server. I checked after restoreing, tables and data is there on GoDaddy SQL Server(I used LinqPad).
I used publish output created on step 1 and updated connection string and uploaded to GoDaddy.
When I browse site it shows me install screen.
Why it shows me install screen even if it has data in database as well as same set of file as IIS local? What I am missing.
Thanks for help
Edit
I get below logs
{"#t":"2021-03-24T11:50:03.7387476Z","#mt":"{EndMessage} ({Duration}ms) [Timing {TimingId}]","EndMessage":"Booted.","Duration":1592,"TimingId":"6f43df2","SourceContext":"Umbraco.Core.Runtime.CoreRuntime","ProcessId":1700,"ProcessName":"w3wp","ThreadId":29,"AppDomainId":3,"AppDomainAppId":"LMW3SVC8ROOT","MachineName":"S107-180-73-24","Log4NetLevel":"INFO ","HttpRequestNumber":1,"HttpRequestId":"75319e5f-ad35-4c7b-9aa2-fe04a05c9007"}
{"#t":"2021-03-24T11:50:04.1450357Z","#mt":"New url {Url} detected, re-discovering application url.","Url":"http://yourmodern.skinfogroup.com/umbraco","SourceContext":"Umbraco.Core.Sync.ApplicationUrlHelper","ProcessId":1700,"ProcessName":"w3wp","ThreadId":16,"AppDomainId":3,"AppDomainAppId":"LMW3SVC8ROOT","MachineName":"S107-180-73-24","Log4NetLevel":"INFO ","HttpRequestNumber":2,"HttpRequestId":"7f3c5e24-22d0-4cc8-940d-13b6e8622a9f"}
{"#t":"2021-03-24T11:50:04.1450357Z","#mt":"ApplicationUrl: {UmbracoAppUrl} (UmbracoModule request)","UmbracoAppUrl":"http://yourmodern.skinfogroup.com/umbraco","SourceContext":"Umbraco.Core.Sync.ApplicationUrlHelper","ProcessId":1700,"ProcessName":"w3wp","ThreadId":16,"AppDomainId":3,"AppDomainAppId":"LMW3SVC8ROOT","MachineName":"S107-180-73-24","Log4NetLevel":"INFO ","HttpRequestNumber":2,"HttpRequestId":"7f3c5e24-22d0-4cc8-940d-13b6e8622a9f"}
{"#t":"2021-03-24T11:50:04.5356961Z","#mt":"Umbraco must install or upgrade.","#l":"Warning","SourceContext":"Umbraco.Web.UmbracoModule","ProcessId":1700,"ProcessName":"w3wp","ThreadId":16,"AppDomainId":3,"AppDomainAppId":"LMW3SVC8ROOT","MachineName":"S107-180-73-24","Log4NetLevel":"WARN ","HttpRequestNumber":2,"HttpRequestId":"7f3c5e24-22d0-4cc8-940d-13b6e8622a9f"}
EDIT 2
I validated that connection string correct. I am able to connect to the database and execute queries. I have also validated that it has same no of tables and rows.
This Umbraco forum thread says it could be a permissions issue: https://our.umbraco.com/forum/using-umbraco-and-getting-started/102946-moving-umbraco-v8-to-new-server-fails-you-see-this-screen-because-your-umbraco-installation-did-not-complete-correctly#comment-322275 - specifically the part in there about
changed the permissions on the server (by creating a new sql server
user and login with the same rights)
Heres my debuggin tips:
Have you upgraded? Have you copied the DB into live, or, you using a fresh DB?
How are you doing your transforms? Perform a file compare between files using a tool like Beyond Compare
Delete contents of Add_Data
Install screen can be triggered if Umbraco.Core.ConfigurationStatus is not populated
See this for details:
https://www.jondjones.com/learn-umbraco-cms/umbraco-7-tutorials/umbraco-upgrading-guide/how-to-reinstall-umbraco/
There was issues with the server. I validated this by.
Hosting same website on other server(works)
Hosting website with default data on same server(does not works).
Edit
Rebuilding server did not fix the issue.

ASP MVC5 deployment from TeamCity

I have a website built with ASP MVC5.
Also I use Entity Framework 6 with Database First approach and edmx.
On production I already have database with a lot of data.
I'm using TeamCity for CI and would like to perform auto deployments.
I found Web Deployments and also tried to configure Publish profiles.
But 1 have some questions:
1. What about database? how to migrate, upgrade schema and data automatically? Are there any tools for that?
2. Could you describe how publish via Web Deploy works? I see connection string definition, etc. How it copies files to remote box, and how applies DB (schema, data migration?)
3. Also I configured IIS website for FTP upload deployment. How it connected with previous cases?

Visual studio Portable login

I'm working on a website in visual studio for my senior project. I am trying to set up a login page for the website but since I have to be able to submit the finished project I was wondering if there was a way to set up the website administration tool to work anywhere.
i.e Is it possible to save/set up the sql server database that is used to login to the website on a flash drive where the entire project is stored? This way even if I open up the project on a different computer I will still be able to access all aspects of the project.
Any links to resources that I can scour would be greatly appreciated.
I am using Visual studio 2012 with asp.net 4.5
1.If you want a common database location which should be accessed by all, then you'd need to make certain that other machines have access to your local machine's database server
If you want the entire code plus the database to be present separately on each machine, then you'd need to share a database backup along with the application code folder and each machine would require the database backup to be restored on their database server along with setting up the application.
3.i can also prefer the Join me or VNC or any virtual tools to access your machine

Deploying MVC4 Website to Windows Azure

Just a quick question. I deployed a website to Azure and it works fine. I'm just wondering do I have to change the account model to enable accounts be used from the azure sql database? I can register and login on the deployed website, but the details arent going into a table it's using the default method that is generated for an MVC4 website application.
Thanks in advance.
Yes - you need to use an External DB (Azure SQL or another SQL instance). You cannot use a SQL Express user instance stored under App_Data for this. When you launch the project in the development fabric, the app is really running from a copy in the bin\Debug[YourProjectName].csx folder of the cloud project, and the database that the application modifies will also be a copy in that folder. Every time you restart the application in the development fabric, the changes to the database are overwritten by the copy in your project's folder.
If you are going to test the cloud project locally using SQL Express, you are better off using a database that is not running in user instance mode.

appharbor connection string

I'm building an ASP.NET MVC3 application that requires access to a database. I've successfully set up the database on my local machine and everything works fine but then I uploaded the app to appharbor.com for testing and now I can't access the database anymore.
How do you add a connection string for a SQLEXPRESS database on appharbor.com? The database file is in located in the App_Data folder. I've been trying for days to make it work without avail. I already added the SQL Server add-on on appharbor. I'm not using any Entity Framework features if it helps to know.
You shouldn't use application-embedded SQL Server express databases when running on AppHarbor. Whenever a new application version is deployed, any filesystem state is lost and you'll loose any changes to your database. Check out this guide on how to use the Sequelizer add-on: http://support.appharbor.com/kb/add-ons/using-sequelizer

Categories

Resources