Silverlight / server folder permissions - silverlight

My Silverlight web site is supposed to let the client download a zip file. The zip contains two pdf files that are copied to a temp folder, plus a third pdf file created using crystal reports. On debug in my computer this is working perfectly. However, I've just published the project on a remote server and I can't download the file.
I don't know if the problem is with silverlight or the server, since I wasn't the one that configured it. When I run fiddler, it throws an 'Access to folder is denied' error.
Both me and the server Administrator already set permissions to write and read from that folder to every account of the server, and still does not work.
Can anyone help with this, I can't seem to figure if the problem is with the server or silverlight. The server is running Windows Server 2008 R2 Standard.
Thanks

Seems it has nothing to do with Silverlight.
The IIS worker process must have the rights to access this folder (mostly it's a group called {MachineName}\IIS_IUSRS).
If you're using Single Sign On/Impersonation, then the actual user as currently authenticated by the Network's (Windows) Domain Controller has to have access rights to that folder, which is not a recommended security architecture.

Related

Missing: Outlook 16.0 Object library (msoutl.olb)

I'm running an MS Access database with VBA code that has libraries for Microsoft Office 2010. Currently, there are users that are upgrading their machine to Windows 10 running Access 2016.
When the database is opened on a new machine running Access 2016 the libraries for the Outlook changes to 16.0.
When I try to open the file in the old Access 2010 environment, I run into this error:
Missing msoutl.olb.
Is there a way to make the database backwards compatible?
It sounds like the users share the same frontend hosted in a network folder.
If not done already, split the database to have a single shared backend database file. Then, to avoid your issue, distribute a separate copy of the frontend to each user's workstation.
On the workstation, let the user launch the frontend using a shortcut that runs a script to always keep the frontend current. This method is described in detail in my article:
Deploy and update a Microsoft Access application with one click

hosting website own server while uploading file how to chose my computer directory?

I'm hosting my website on server and when i'm going to choose file uption it give me error.the file choosen is working perfectly in local server but problem on hosting server the error message screen short is
enter image description here
I have got salution own my strugle.The answer is
im hosting my website on plesk server and when i upload file it don't give me permission for write on folder .folder may make changes on my plesk web host server inside my project i have made changes and give aceess to write.

vs 2017 entity core 2 not using the right data directory

experiencing an odd issue I've yet to see on any of my other machines. This is a fresh laptop, so I have installed VS 2017, SQL Server 2017 express, then created a quick sample project using one of the stock .net core projects (with authentication stored "in-app"). This, of course, creates some basic entity migrations and DB context.
When I run I'm getting access denied errors. So, of course, I checked SQL service default user which is an admin. I then run basic migration commands and receive this
So, of course, my next step was to double check the default data locations of SQL since it appears to be trying to store it in C:\Users root?! I have never had to bother touching this during install, but worth a look. And of course, they are as I expected in their default locations of C:\Program Files\ etc
Rapidly running out of things to try at this point - and considering this is a fresh windows 10 install, with bare-bones vs 2017 and SQL express 2017 it feels a lot like a bug here. Everything is a default if you were to File -> New Project -> .NET Core Web Application with INdividual accounts.
Anyone have any thoughts or things worth trying? Why is it trying to store my DB in C:\Users? Connection string -
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-WebApplication3-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"
Thanks!
-Marc
You are not using SQL Server Express.
The local string says (localdb), which is the SQL Server engine running in user space. This is a big difference. Usually SQL Server or SQL Server express runs as service. (localdb) is not an alias for localhost (loopback address). It's a special name for a minified version of SQL Server which runs in user space.
When SQL Server runs as a service, it needs to have read/write permissions to the folder it writes. This is usually NOT THE CASE when the file is located within the User folder.
LocalDB on the other side, is always started when you start debugging your application and runs with the permissions of the user. So if your file was created by an admin user or outside of a directory you have write permissions.
Also, when you mount a database to SQL Server (Express), then the file is protected from write access to other applications, so LocalDB can't open it neither.
LocalDB is made for development to offer most of the SQL Server features but without all the hard setup and permanently running service in the background.
Essentially you have two options:
Use the SQL Server connection string as #TanvirArjel suggested
Detach the database from SQL Server express, copy it to your user folder (C:\Users\<myusername>\) and then correct the path to it
Then it should just work.
Notice that LocalDB is not meant to run in production, so you will likely experience issues when trying to run it in IIS (IIS Express and Console applications and WPF work fine).
Reasons for LocalDb not working with IIS is because ASP.NET (Core) applications within IIS run with a special user, but LocalDbs are always created in the users profile folder. Now, the accounts used by IIS don't have a profile and can't create the database and can't access any database outside (since localDbs are stored in user folder only the user who created it has access to it).
Here some source on it and the reasons behind it.
Using LocalDb with IIS
Write the connection string as follows.Hope it will work...
"DefaultConnection": "Server=YourPcName\\SQLExpressInstanceName;Database=aspnet-WebApplication3-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"

ASP MVC application's databases not visible in Management Studio

I deployed a simple ASP.net MVC application on IIS (7.5 under win 2k8 R2 64 bit), and it created its databases (ApplicationData and the second one with my own data) when I started using the app.
The databases (.mdf and .ldf files) were created inside App_Data folder.
Application uses entity framework code first approach. I had to change the app pool's identity to Network Service to get the webpage working. I also had to manually create this App_Data directory and assign permissions for Network Service user to modify it's contents.
Now the problem I got is that I can't see those databases in Management Studio (got SQL server 2012 express with advanced services installed). I can attach them manually if not using the webpage for a longer time, otherwise the .mdf files are locked by sqlservr.exe process of Network Service user.
All the time I got two simultaneously running sqlservr processes. One is run by MSSQLsomething user and the second one by Network Service. However, I got only one instance of SQL server installed (I'm 100% sure of it).
Could anyone explain me how is that possible that Management Studio cannot see those databases even at the moment they're being used (locked by sqlservr.exe process)?
This is because the database is hosted in User Instance Mode, and therefore not actually attached to the 'official' database server.
In that article you'll see that this is enabled using User Instance=true; in the connection string. To switch it off you specify User Instance=false;.

Migrating dotnetnuke from development to test server

I am a newbie with DotNetNuke and have been stumbling on how to deploy from the development server to the deployment server. For starters my development and deployment servers are one and the same machine. Here are the steps that I did:
DNN Setup
Downloaded DNN using WebMatrix.
Launched DNN and proceeded with the installation wizard, which is basically just testing the environment and then creating the DNN database.
After the wizard's installation launching DNN will now proceed to the Getting Started page
Added "localhost/dnn" in the site alias list
Moving to ISS
In IIS I added application (folder) DNN in the web root
I copied all the files from the original webmatrix path to the dnn folder in c:\inetpub\webroot making sure that the file/folder hierarchies are the same
Result:
When launching DNN using my browser I am directed to the installation wizard page instead of the Getting Started page. What am I missing?
Thanks!
Confirm that the permissions on the folder containing DNN are the same on your test server as they are on your development server. (I give Network Service read/write and IUsr Read/Execute)
Confirm that the application pool running your application has the proper identity (Network Service is suggested) and is running the proper .NET Framework version; based upon your question, I think you are set on this.
Gain access to your web.config file. You will see a ConnectionStrings section. You probably need to update the connection strings.
If your test server runs off of a different database than your dev server, figure out the connection string of your test server and update your connection string accordingly
You may be able to restore a .BAK file of your DB to your test server
If you do this, you will probably need to (in SSMS) edit your Portal Alias table to include the host name that you are using in your test server environment. Examples: Maybe you access the site via localhost/ on your dev environment, but you access to test site via test.Ronald.com? test.Ronald.com would be your PortalAlias
If your test server runs off the same database server as your dev server, it sounds like you need to open up access in firewalls so that your test server has connectivity to your dev database
A word of advice
Once you get it running, you will be making changes to each database separately (assuming your test site and dev site use different DB Servers). This sync issue can be a royal pain with DNN, as your page structures, module assignments, html module contents, installed modules/extensions will get out of sync. While restoring backups is nice, it is not a very good long-term solution. I recommend database-syncing tools
The problem is most likely a problem with DNN not being able to find the Database. If it can't find the database, it will run the wizard in order to create one.

Resources