Does Azure support <ipsecurity/> in web.config? - azure

In this post (as of January 10th) Allen Chen says it does not. However, it seems like the other poster indicates that it does (at least in the dev fabric). Does anyone know if this is supported.
My hope is to restrict access via IP address to my staging and dev sites. Adding this to the respective web.config's would be the easiest way.

You can get this working via a web role startup.cmd. Andy Cross has a great blog post explaining how http://blog.bareweb.eu/2011/04/restricting-access-by-ip-in-azure-web-role-v1-4/

I ended up just creating an httpmodule and filtered using that. I used Scott Hanselman's solution here as a starting point: http://www.hanselman.com/blog/AnIPAddressBlockingHttpModuleForASPNETIn9Minutes.aspx
It worked like a charm and provide a lot of flexibility.
Thanks Scott.

I don't believe it is settable today in the webrole. Checking the applicationHost.config, I see that ipSecurity is set to disallow override, which means you cannot set it at the web.config level. That being said, if you take over the IIS process via Hosted Web Core (see code.msdn.microsoft.com/hwcworker), you can change the applicationHost.config and it might just work.

Related

blog vs custom website content update

i have a project with a friend and its about developing a website which will provide the users with some courses on certain topics.
And we were wondering on how we are going to be updating the lessons notes and posting new ones without any problem. And he said the cpanel provided by the host company will provided a means to post just like on blogs. So i doubted and i'll like to ask if it true or i'll have to code a new page for every topic on the site.
Please i'll appreciate if any one helps me with the truth or a guide on how to do it.
thanks...
A good starting point for you is to use github to host a code repository you start with git. If you use github, you can utilize github pages to host your content for free.
If you already have a hosting framework in mind like WAMP or heroku, let us know and we can provide more specific information on how to push your code up to your application depending on how you're hosting it. But the best starting point for you is to use some sort of version control and the leading version control option is git. You definitely never need to rewrite the same code all over again and version control is essential for managing updates to your code and collaborating with other developers.

Why can't we assign Localization to ApplicationPoolIdentity

I've been investigating some localization issues with our web application and even though I start to understand the problems and the way to solve them... I still have a couple of questions I failed to find a decent answer to.
It would be great of some people can point me out to appropriate documentation for me to read up and understand more the concept of ApplicationPoolIdentity.
What I understand so far:
There are 2 ways to make your web application Localization-aware based on your requirements.
1) Configure in the web.config file (Globalization) or in the IIS UI for the specific website.
This works great, except it does not pick up Globalization on IIS-level when website is Auto Detect or Invariant Culture? What's the hierarchy it's using?
2) Configure Localization for the user under which the IIS process is running.
You need to copy the Localization settings to the system accounts (as explained here)
You then need to run the apppool under one of these accounts (local, Networkservice, LocalService...)
It does not seem to work when running under ApplicationPoolIdentity
ApplicationPoolIdentity is a virtual user account, assuming that's why it's not picked up by the copy-to action in Localization.
Although, it's not working either when I say Copy-To-New-Accounts.
So what Localization is the ApplicationPoolIdentity using???
It seems the default one based on the Windows Installation, am I right here?
If anyone can correct me and answer my questions, or link to some more documentation around this. Really appreciated.

Have small chat application but i need current online users

In sharepoint I do have chatter web part.
That web part does not show the online user.
In sharepoint are there any ways to get online users into the WEB PART.
Please guide it is the requirement.
THanks a lot in advance
This is not possible out of the box with SharePoint. It's a big limitation, I know because I've been looking for ways to do this as well. But there may be a ways around it:
The following was proposed here: go4answers.webhost4life.com/Example/code-get-many-users-logged-sharepoint-79841.aspx
What comes to mind is that you could write something that would hook into the session_start and session_end. Here's an ASP.NET blog that covers it. http://imar.spaanjaars.com/QuickDocID.aspx?QUICKDOC=223.
I then realized that this may not work since sharepoint uses SqlServer, by default, not InProc for its session mgmt. This would prevent session_end from firing.
Ok, so if you change your web.config to use InProc, it should work. There are implications in doing this, of course. Here is an article that lets you assess where this is a safe thing to do based on your environment. http://sharepoint-one-stop.blogspot.com/2008/06/moss-2007-interview-questions.html

Symfony 2 : Custom user provider

Since this article http://symfony.com/doc/2.0/cookbook/security/custom_provider.html has not been written yet, has anyone an idea of how to do that ? (In my case it would be using LDAP authentication).
Thanks for your answers
To help you get started you can check out my blog post which outlines how to create a very basic user provider system:
http://clintberry.com/2011/custom-user-providers-symfony2/
EDIT: This post only covers the custom User Provider. To use LDAP authentication you will need to create your own Authentication Provider as well or use a third party library. http://symfony.com/doc/current/cookbook/security/custom_authentication_provider.html
This first thing I would suggest you is to do a search for a LDAP bundle on the great website KnpBundles (results here). I saw two results. If you are willing to use an external bundle, you could just use of the two given in the results.
If you prefer to create your own bundle for this task, what I would suggest is to inspire you from these two bundles. Another useful suggestion is to check the FOSFacebookBundle. It is in no mean related to LDAP but, they implements their own provider, so all the glue is there to implement your own.
Just a small notice, if you are developing against Symfony2 master branch, it is good to know that security factory registration has changed a bit. So, be carefull when looking at other bundles to be sure what version they are targeting.
Hope this helps.
Regards,
Matt

Wix - set file read access

I am looking into a way of setting read access on a specific file for a web application (where all files read option is set to be false--unchecked in IIS) deployed with Wix. Is it a possible option at all or I am asking the question in a wrong way?
Thank you.
That level of granularity is not supported by the WiX toolset's IIS custom actions today. It'd be cool if someone implemented it and contributed back to the community.

Resources