hi. is it possible to use a final web content site, using a user with readonly access to DB?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
2/25/2013 8:40:15 AM
Gravatar
Total Posts 18439

Re: hi. is it possible to use a final web content site, using a user with readonly access to DB?

I think you do not follow my instructions or you do not know how to make a copy of a database by backup and restore. I just tested it and it works for me. It doesn't matter about exec permissions since the writes happen on the copy it does not update the database in the read connection string and no errors happen for me.

1. Content must be completely created using only MSSQLConnectionString

​2. Make a backup of the database configured in this connection string.

3. Create a new db with a different name, right click it and choose Tasks > Restore > Database

4. Check the radio button "From Device" browse to the backup created in step 2, then check the box once it shows in the list of devices

5. Click Options then check Overwrite Existing DB

6. In the section "Restore the database files as" you must browse and select the files for the db created in step 3

7. After restore is complete set the MSSQLWriteConnectionString to point to the new db

​It works for me. If I edit site content it does not get updated in the read connection string db so no edits appear on the site.

2/25/2013 1:55:03 PM
Gravatar
Total Posts 192

Re: hi. is it possible to use a final web content site, using a user with readonly access to DB?

ُThankyou Joe.

Yes it works if I do all these steps. and I said this before.

but I was doing some additional things.

I changed the user under which the app pool runs. the new user owned the db_owner schema  on the DB with writeConenction (the same with role membership)

but owned the db_datareader schema on the normalConnection (and also the same with role membership).

As i said before, it does work if user has write on both, even thought new writes is written only to one of the DBs and not reflected on site.

I think this trick is possible because of the powerful and nice design of mojoportal.

You must sign in to post in the forums. This thread is closed to new posts.