I have backed up the Kentico Database and website from one of our Live servers and placed it within our Dev server and configured the website in IIS.
When I navigate to the website, it currently asks for New installation.. Whereas it should just show me the current website.
How do I get it to show the website?
EDIT
The following error occurs when going ahead and creating a new instance with the restored Database:
Restore the backed up database and add database connection string to the web.config of the application. Simple as that :)
Who or what is set as the DB objects owner/schema in the DB? Does this match the setting in Site Manager (or, CMS_SettingsKey table)? I would make sure these two match.
Another option is that the connection string was not initialized by .Net - I would do a dummy change in the web.config file to force the app restart and/or also clearing the .Net cache.
Related
I recently just deployed a web app in Azure App Service. This web app uses 2 separate database (2 connection strings) to be able to function fully. Upon deploying and browsing the web app, the first database got automatically created but the 2nd one was not. I was expecting for both to be automatically created but I can't make it happen for the 2nd database.
I checked the connection strings and it is correct. What do I need to so the 2nd database gets created as well?
EDIT:
Code was requested but I am not really sure what relevant code I need to post. This is the only thing I can think of that might be involved in the database creation.
in ConfigureServices:
services.AddDbContext<FirstDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("FirstConnection")));
services.AddDbContext<SecondDbContext>(options =>
options.UseSqlServer(Configuration.GetConnectionString("SecondResourceConnection")));
Not sure if this is the correct code I need to post relating to this.
EDIT 2:
One thing to note is that this worked in my local, both DBs were created.
I'm trying to get the current IIS application name in my ColdFusion scripts but I have no idea where to get this information. I want to use the app name to communicate with IIS using cfexecute by running appcmd.exe.
<cfexecute name="c:\windows\system32\inetsrv\APPCMD" arguments="add site /name:#arguments.sitename# /bindings:""http/*:80:#arguments.binding#"" /physicalPath:""#arguments.physicalPath#""" timeout="60"></cfexecute>
The problem is that I can't be sure what the app name is. I could save it somewhere in a db but i'd really like to get it dynamically so the script can run without configuring the appname. If I could be able to fetch it from somewhere (or maybe based on the current hostheader) I could dynamically fill
/name:#arguments.sitename#
I've tried to search how to do this by using PHP and JSP examples, but so far, i haven't been able to find any method on getting the app name.
Following on from #Miguel-F's link (http://www.iis.net/learn/get-started/planning-your-iis-architecture/iis-7-and-iis-8-configuration-reference) in the comments above, there's a file in %windir%\system32\inetsrv\config\ called applicationHost.config that you could read in - this file contains the collection of sites that's configured in IIS. Is that the sort of thing you're after?
So I've finally move my application from development(inaccessible through internet) server to production(accessible through internet) server and I got the following runtime error whenever I'm trying to save a document:
Error while executing JavaScript action expression
Script interpreter error, line=23, col=10: [TypeError] Exception occurred calling method NotesXspDocument.save() not allowed to access or modify file: C:\WINDOWS\TEMP\notesC053A6\xsppers\22\DHRRDLYBXJ
not allowed to access or modify file: C:\WINDOWS\TEMP\notesC053A6\xsppers\22\DHRRDLYBXJ
I've done some testing to see where this would occur and found that it only happen when running the application in a web browser (including the Notes 9 web browser) and creating a new document and saving it.
If I run the application via XPiNC, create a new document and save, I'm able to save the document. And this document can later be edited and saved whether in XPiNC or web browser.
I'm not aware of this problem because during development I usually only test in notes client. When it come to web browser, I'll just create a local copy to test because the development server does not allow access through web browser.
Is there any server setting that I should change? I'm not admin but I could inform my boss to change. Thanks.
EDIT
After further testing, I found that uploading a file could be causing the problem. My XPage has fileUpload control for user to upload attachment with the document. But since it worked on XPiNC I need to know why it doesn't work in web browser and the solution to this.
Check to see if the user running the service of the domino server has full access rights to the c:\windows\temp folder
If your server is running Windows 2008 and no specific user is added to run the service.
Make sure that both system and Services has full access to that folder.
I have a silverlight web project using LinqToSql for database connection. I developed it on my local SQL box using the local name of database. Now, when i deploy it on my production web server, do i have to recompile the code again to change the connection string for production db or just changing the db name in web.config will work.
Also, do i have to give specific username/password in the web.config file or dbml will pick that from IIS AppPool.
When you create your app in .net 4, you will get 3 web.config.
the live connection string should be put into the web.live.config.
just search for it for guidelines.
You dont have to recompile, but you have to point your linq to sql default constructor to use the connection string from web.conf
in web.conf use the connection sring with user name and password for the new server and you will not have to set password or username any where else.
please refer to this article for more help
http://aspilham.blogspot.com/2011/01/how-do-i-set-connection-string-in-linq.html
What are the best practices for updating a web application in IIS?
The first page you see when you visit our application is a login page.
What I want to achieve is that visitors be redirected to a page stating that the application is being updated. And for users with an admin role being able to login successfully (to check whether everything is working properly)
In web.config we keep track of wheter the application is being updated (updating = [true|false] and then on the authentication_event:
if (updating)
{
if (User.IsInRole("admin"))
{
redirect to main web app...
}
else
{
redirect to web being updated page....
}
}
else
{
redirect to main web app..
}
Any advise will be appreciated immensely..
I test everything locally, then I use the built in app_offline.html file on production server.
When this file is present it will be served to clients, in meantime I am uploading new content. When done, renaming app_offline.html to something different and the new app starts.
instead of doing it via web.config, you should be saving the updating flag in some other xml file or database, as each time you update your web.config file, your application restarts, thus invalidating current application variables, caches, etc etc
apart from that, you got the other logic right. but avoid touching the web.config as far as possible - i personally only save the connection string in the web.config as that hardly changes
but rest of the key value pairs which change often, i have them saved in sql database table. so that way i never ever have to do an application restart unless my connection string changes :-)
Looks like you pretty much have it figured out.
if (WebConfigurationManager.AppSettings["updating"]=="true")
if (User.IsInRole("admin"))
Response.Redirect("~/Main.aspx");
else
Response.Redirect("~/Updating.aspx");
else
Response.Redirect("~/Main.aspx");