MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

MonoX on Azure  (Mono Support )

Viewed 36559 time(s), 6 post(s) 9/3/2015 2:51:09 PMby Dinesh.Sajwan

Related topics

Dinesh-Sajwan

Dinesh.Sajwan

9/3/2015 2:51:09 PM
Hi,

We want to deploy Monox on windows azure on Platform As a Service i.e Using Web Roles and SQL Azure.
For this i believe we have to do two things
1. Moving Session State from inproc to Azure Managed Cache(outproc)
2. Moving File Storage from Local to Azure Blob Storage

Please guide me how to achieve this.

i have already read these two articles.
http://monox.mono-software.com/Blog/post/Mono/202/Running-MonoX-on-Azure/
http://monox.mono-software.com/Blog/post/Mono/232/Simple-Azure-Cache-Provider-for-Monox/

Regards
Sumit
This content has not been rated yet. 
1284 Reputation 156 Total posts
khorvat

khorvat

9/3/2015 3:26:34 PM
We can help you with transition to Azure but please let us know what kind of issues do you have ?
This content has not been rated yet. 
15993 Reputation 2214 Total posts
Dinesh-Sajwan

Dinesh.Sajwan

9/3/2015 5:17:47 PM
Thanks,

What all changes i have to do in the application for implementing Session State and Blob Storage...

Regards
Sumit
This content has not been rated yet. 
1284 Reputation 156 Total posts
khorvat

khorvat

9/4/2015 8:25:30 AM
Hi,

you only need to change the web.config settings and use the appropriate providers, you will need to choose what provider to use and here are some options you have

Session
https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-session-state-caching/
https://msdn.microsoft.com/en-us/library/azure/gg185668.aspx?f=255&MSPPError=-2147217396
https://github.com/Azure/aspnet-redis-providers

Cache
Change the default provider to Azure Cache or you can build Redis Cache provider using 
https://github.com/StackExchange/StackExchange.Redis
https://www.nuget.org/packages/StackExchange.Redis/
by following cache provider samples on our GitHub pages 
https://github.com/MonoSoftware/MonoX-AppFabric-CacheProvider

<Cache defaultProvider="AspNetCacheProvider" defaultSystemCacheDuration="3600" defaultWebPartCacheDuration="0">
  <providers>
    <add name="AspNetCacheProvider" type="MonoSoftware.MonoX.Caching.AspNetCacheProvider, MonoX" />
  </providers>
</Cache>

File Storage should be changed to "AzureFileSystemContentProvider"

<FileContent defaultProvider="AzureFileSystemContentProvider">
  <providers>
    <add name="AzureFileSystemContentProvider" type="MonoSoftware.MonoX.FileSystem.AzureFileSystemContentProvider, MonoX" containerName="your-container-name" accountName="your-account-name" accountKey="your-account-key" urlFormat="{0}.blob.core.windows.net" />
  </providers>
</FileContent>

That should be it, if you run into problems get back to us.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
khorvat

khorvat

9/4/2015 8:27:31 AM
You can also follow this article to build a cache provider if you need a custom one
http://monox.mono-software.com/Blog/post/Mono/232/Simple-Azure-Cache-Provider-for-Monox/

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
Dinesh-Sajwan

Dinesh.Sajwan

9/15/2015 6:39:06 PM
Hi,

Thanks for the support.

Session State: 
Have implemented Redis Cache for Session management in the portal but had to upgrade the portal framework to 4.5 as 4.0 has some issues as far in nuget package...

Was unable to resolve the issue so upgraded only portal project to 4.5. hope this is not a problem..
can u help me in this, i dont want to upgrade the project and still want to use redis cache...
Error: Could not load file or assembly 'System.Threading.Tasks, Version=2.6.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Check this link https://github.com/StackExchange/StackExchange.Redis/issues/96 

File Storage:
Also changed default file provider to AzureFileSystemContentProvider....now files are getting created in my storage account but the files uploaded are shown as locked... see the attached snapshot..

Cache:
i have not started this yet as i am not very clear what to do. please guide me in this.

i have not hosted the app yet in azure and testing locally on my mac.

Please help me in this... 
Regards
Sumit
This content has not been rated yet. 
1284 Reputation 156 Total posts