facing problem in dnn installation on my local machine - dotnetnuke

I have downloaded DNN from (https://github.com/dnnsoftware/Dnn.Platform/releases) Installation version and configured in my local machine by following all steps as they are given. I have given all permission (Read/Write/Modify) but at Installation time it gives Error see this errore http://prntscr.com/ogmkfi
I followed all steps before my last try then I do it well but this time I followed the same process but getting error

The account that runs the application pool for the website needs Modify permissions on the whole directory structure where the web site is installed. Let's assume you have created a website in IIS called dnndevme, and created an application pool with the same name, then the account name is "IIS AppPool\dnndevme".
Normally I do it this way:
Create a folder in Windows Explorer, e.g. C:\Websites\dnndevme
Create a website in IIS Manager, e.g. dnndevme, and assign the created folder to the website. If you don't select another application pool, it will create one with the name of the website ("dnndevme"). Assign a host name, e.g. "www.dnndev.me"
In IIS Manager, select the web site, and double click on Authentication (under IIS). Then I select "Anonymous Authentication", click on the "Edit..." link on the right side and change the anonymous user identity to "Application Pool Identity".
Check: In IIS Manager, under Application Pools, right click the created (or selected) application pool and select "Advanced Settings...". Be sure that the value of "Identity" is "ApplicationPoolIdentity".
In Windows Explorer, right click the created folder and select the Security tab. click "Edit...", then click "Add..." and add the application pool identity, in the case of the example "IIS AppPool\dnndevme". Assign Modify permissions to that account.
Unblock and unzip the installation package into the folder.
In SQL Server Management Studio (SSMS), create a new database, eg. "dnndevme"
If SQL Server and IIS are installed on the same machine: In SSMS, create a new login. Select Login name = "IIS AppPool\dnndevme", Windows Authentication, Default database = "dnndevme". Under "User mappings" select the db_owner role for the database.
If SQL Server and IIS are on different machines you have to create an SQL Server Login (eg. "dnndevme") with a password, the other settings are as above.
Configure the connection string in the web.config file. If SQL Server is on the same machine, use
<add name="SiteSqlServer" connectionString="Data Source=MY_MACHINE_NAME[\INSTANCE];Initial Catalog=dnndevme;Integrated Security=True" providerName="System.Data.SqlClient" />
Otherwise use
<add name="SiteSqlServer" connectionString="Data Source=MY-SQL-SERVER-NAME[\INSTANCE];Initial Catalog=dnndevme;User ID=dnndevme;Password=mySEcrEtpaS$w0rd" providerName="System.Data.SqlClient" />
Now start the installation wizard by navigating to the site in your browser (the defined host name from above).

Related

Could not determine storage version; a valid storage connection or a version hint is required. Error seen

I'm from the Devops team. We created a dotnet subsite in IIS:
Created a Virtual Application in IIS under the main site
Added Physical Path as inetpub\site\subsite
Requirement:
We have a main site. Ex - www.site.com
We need a subsite like www.site.com/subsite which should redirect to the www.site.com
The goal here is that our dev team can do testing and changes under www.site.com/subsite and not directly in www.site.com
RouteConfig.CS looks like this:
routes.MapRoute("TaxSupport", "TaxSupport/{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Tax", action = "Index", id = UrlParameter.Optional });
Output:
Output of www
.site.com/subsite
Probe:
We have already referred to multiple Stack articles in this regard.
We have multiple applications running fine with same Entity Framework and other packages.
We can confirm that subsite web.config is using the same DB connection strings as other applications.
To deploy an application in an Azure Virtual Machine (VM) running IIS, you can follow below steps:
Create an Azure VM with required configuration such as the operating system and size.
Azure Portal > Create > Select Server OS.
Use Remote Desktop Protocol (RDP) to connect to the VM
Use FTP to upload your application code to the VM.
Open the Internet Information Services (IIS) Manager and create a new website or web application in IIS.
Configure the website or web application to point to the location of your application code on the VM.
Configure any necessary IIS settings, such as the application pool and virtual directories.
To deploy a subsite under a site in IIS (Internet Information Services)
Create a Sample Web App and an API for Subsite.
And publish the application as shown below.
Copy these files and paste in the VM of Azure.
Open the IIS Manager on the server where you want to create the subsite.
In the left pane, expand the server node, and then expand the Sites node.
Right-click the site under which you want to create the subsite, and select "Add Virtual Directory".
In the "Add Virtual Directory" wizard, enter a name for the virtual directory and browse to the physical path of the content for the subsite. Click OK to create the virtual directory.
Right-click on the virtual directory and select "Convert to Application"
In the "Add Application" wizard, select the Application pool you want to use for the subsite and click OK.
If you want to configure the subsite with custom bindings, you can do so by right-clicking on the subsite and selecting "Edit Bindings".
Once the subsite is created, you can use the IIS Manager to manage and configure the subsite, such as setting up authentication, creating custom error pages.
And the web.config is using the same DB connection
Connect to the Azure VM using Remote Desktop Protocol (RDP) and open the IIS Manager.
In the IIS Manager, right-click on the parent website and select "Add Web Site".
In the "Add Web Site" wizard, enter a name for the sub-site and select a physical path for the sub-site's files.
Select an appropriate Application pool for the sub-site.
Click on "Test Settings" to make sure the configuration of the site is correct or not.
Open the web.config file of the sub-site and locate the connection string section. And Remove the connection strings from the web.config file of the sub-site.
Add the below line of code to the sub-site's web.config file, in the section: replace "parentSite" with the name of the parent website's config file)
<connectionStrings configSource="parentSite.config" />
Restart IIS by running the command "iisreset" in the command prompt. Test the sub-site by visiting the sub-site's hostname in a web browser.

The SELECT permission was denied on the object 'aaa', database 'bbb', schema 'dbo'

I have a .net core application which hosts on Window Server 2012 IIS in production. One of screen is to display the result from a select statement.
But I got the error
`The SELECT permission was denied on the object 'aaa', database 'bbb', schema 'dbo'.
The thing is that I can run the select query from Microsoft SQL Server Management Studio successfully.
The connection string in my code is
"Server=MyServer, Database=MyDatabase;Integrated Security=True"
I don't have an user account on the connection string, so please don't advise me to right click security\Users node on the database to grant the user read and write permission etc.
I think is it some set up in Windows Server?
Update:
In our test QA site, we have another Windows Server 2012. The same code, however the test web site just runs fine. So I think that there is a difference but I couldn't figure it out. The application folder security setting are same.
When testing on your local machine, the app runs in the context of your user account. This is the account used for connecting to the database with Integrated Security.
When deployed in IIS, the app runs in the context of a web site or virtual directory that maps to an IIS Application Pool. You can see these Application Pools in IIS Manager. The Application Pool runs in the context of a specific user account, and this is the account used for Integrated Security:
You need to find this account and give it access to your database. Certain common account types, such as Network Service and ApplicationPoolIdentity, will not work well with Integrated Security out of the box. You may need to take extra steps, or even create or request a special service account in Active Directory you can use instead.

MVC 5 Application connecting to SQL Server : Select permission denied

I have an MVC application that connects to SQL Server (I used a database first setup with ADO.NET Entity Framework 6.0). When I debug on my laptop it connects to the SQL Server correctly and renders the page without issue. But when I publish and connect to the remote server (which also is hosting the SQL Server instance) I get an error: Select permission was denied. Of note is that this is set up to only work when connected to the corporate network (or with a VPN), and the server is intranet only.
I have been looking at potential solutions, and the user account on the database has db_datareader and db_datawriter permissions. My connection string calls for integrated security=True.
I access this same database from desktop applications using those settings with no issues, so I am thinking that there is a difference with the way IIS is evaluating the user.
The server is set up to assign everyone into a single account for the purposes of database access, so all of the DOMAIN\USERS are mapped into a single account called DOMAIN\MyDatabaseUser.
This user has the correct permissions in the database/security/users property window.
I took a look at an answer for a similar issue that referred to the IIS Application Pool, but that issue was getting login failure, which I am not seeing.
Here is my connection string:
<connectionStrings>
<add name="PMToolsEntities" connectionString="metadata=res://*/Models.PMToolsModel.csdl|res://*/Models.PMToolsModel.ssdl|res://*/Models.PMToolsModel.msl;
provider=System.Data.SqlClient;
provider connection string="
data source=SERVER\MySQLExpressInstance;initial catalog=MyDatabase;
integrated security=True;
MultipleActiveResultSets=True;
App=EntityFramework""
providerName="System.Data.EntityClient" />
I have tried setting integrated security to SSPI but I get the same result. I also, for grins, removed the integrated security setting entirely and then I get a login failure (login failed for user '') as expected.
Here is what the permissions look like for MyDatabaseUser:
I basically added everything except the deny items to be sure, but I'm not getting in still.
Here is a link to what ultimately helped me (along with a patient IT guy who let me browse around on the server that I wouldn't normally have access to).
On Windows Server 2012, in the IIS MMC snap in I could see that my web site had an Application Pool added specifically for the site called MySite. Windows automatically creates a virtual user that needs to be added to the SQL Server Logins (not the database users) called IIS APPPOOL\MySite. The trick is that you must not use the search function in SSMS as it will replace IIS APPPOOL with the ServerName and therefore fail to resolve the account.

Attached DB in SQL Server Management Studio to copy a table and now Web app cannot access DB

In order to copy a table's data to a new table with additional fields the DB was attached in SQL Server Management Studio. Once the data was copied to the new table and the old table was dropped, the DB was detached. The DB was then opened in the development environment with Visual Studio and was accessible from the Server Explorer Data Connections. However, now the application cannot open the DB when running on the web server and gives an error saying: Cannot open user default database. Login failed. Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.
The web.config application connection string is:
<add name="ApplicationServices" connectionString="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\ASPNETDB.mdf; Integrated Security=True; Connect Timeout=30; User Instance=True;" providerName="System.Data.SqlClient"/>
I have read over 30 post on this type of error and everything I tried from the suggestion I found did not help. NT AUTHORITY\NETWORK SERVICE in in both the server's users and the DB's users with dbo.owner rights and the app pool for the web server is set to use NETWORK SERVICES.
I am guessing that maybe SQL Server Management Studio made some changes to the DB when it was attached that are effecting the security access rights for the web server application, but not for direct data connections but for the life of me, I can not find what that may be.
The application is being developed with Visual Studio 2013 for Web using a local IIS 7 server as localhost and SQLEXPRESS for the database server. The application development process has been going along fine up till now. However, at this point development has come to a halt and I am dead in my tracks until I can get this resolved. Any help would be appreciated!
Thanks in advance!
David
Are you sure there are no orphaned users?
http://technet.microsoft.com/en-us/library/ms174378.aspx
-- Detect any orphans
EXEC sp_change_users_login 'Report';
If you already created server login named 'Mary' on SQL Express, use the following command to remap.
-- Remap to same existing login
EXEC sp_change_users_login 'Auto_Fix', 'Mary';
You can use this optional syntax to create the login with a password.
-- Remap to new login
EXEC sp_change_users_login 'Auto_Fix', 'Mary', NULL, 'B3r12-3x$098f6';
GO
In a nutshell, you can use SSMS to manage that SQLEXPRESS server. Poke around and make sure the logins and users are mapped correctly. You can even test if you have the Trusted login credentials.
If this still does not work, please post back to me.

Unable to open database when website hosted in IIS

When I run my website from Visual Studio it all works fine. Now I am trying to move forward and start testing the multi tenancy part, so I had to move my website to IIS.
For some reason I can't get access to the database. The error I get when I open a page that requires database access is:
Cannot open database "GWD" requested by the login. The login failed.
Login failed for user 'IIS APPPOOL\gwd'.
Exception Details: System.Data.SqlClient.SqlException: Cannot open
database "GWD" requested by the login. The login failed. Login failed
for user 'IIS APPPOOL\gwd'.
Another forum describes how to add NT AUTHORITY\NETWORK SERVICE. But that doesn't resolve the issue. I did create the NT AUTHORITY\NETWORK SERVICE and added the dbowner for all existing databases (including master) but no result.
I am out of ideas, can anybody help?
You'll need to change the application pool identity to NETWORK SERVICE as well. Fire up Internet Information Services (IIS) Manager, drill down to Application Pools, and select the Application Pool that you're using. (Not sure? Drill down to your virtual directory under Sites on the left side and then click Basic Settings on the right.) Then click your Application Pool, click Advanced Settings, and then change Identity under Process Model to NetworkService.
In SQL Server Management Studio, you'll need to add the NT AUTHORITY\NETWORK SERVICE user under Security for your database, but it sounds like you already did that.
You see the error "Cannot open database "GWD" requested by the login. The login failed. Login failed for user 'IIS APPPOOL\gwd....." because you copy the application to the IIS server and the membership provider has been added in the web.config file without an applicationName attribute.
I suggest you add an “applicationName” attribute to your provider declaration. Example:
<membership>
<providers>
<add name ....
.
.
.
.
applicationName="/yourWebApp" />
</providers>
</membership>
Just look in the aspnet_Application table to find out the application name that was used when creating the users/data during development.
I hope it helps.
#Nicholas Piasecki has offered one potential solution, and the other would be to leave the app pool as it, and instead grant the AppPoolIdentity that it is currently running under access to the database instead.
First, you'd need to add a new Windows login to the SQL Server for the user: 'IIS APPPOOL\gwd'.
Once you do that, you'll be able to add that user to the database with the appropriate permissions, just as you did for Network Service.
i think you must read this article
Configure IIS, asp.net and SQL Server from codeproject
In this article you will learn how to configure IIS and SQL Server using Network SERVICE (with screenshot)
Content of this article
Install IIS
Configure IIS for Network SERVICE
Configure SQL Server PERMISSIONs
On your IIS
Select the application pool you use on your site > right click > click Advance Settings. On Identity select "NetworkService"
enter image description here
On you database [SQL]
Create Login for NT AUTHORITY\NETWORK SERVICE. Modify User Mapping
enter image description here

Resources