Posts

Showing posts from 2010

Find Vb.net project execution path and get environmental variable value

 Dim aPath As String  Dim aName As String         aName = _           System.Reflection.Assembly.GetExecutingAssembly. _           GetModules()(0).FullyQualifiedName        ' aName = C:\Cast\Source\ver 5.6\DialogCast.Net\bin\Debug\Cast_Component_Net.dll         aPath = System.IO.Path.GetDirectoryName(aName)        'aPath = C:\Cast\Source\ver 5.6\DialogCast.Net\bin\Debug ' -------------------------------------------------------------- Public gstrWinDir As String         gstrWinDir = Microsoft.VisualBasic.Interaction.Environ$("windir") ' gstrWinDir =  C:\WINDOWS

Failed to access IIS metabase.

Image
What is the problem The error message tells you : [HostingEnvironmentException: Failed to access IIS metabase.] !> The process account used to run ASP.NET must have read access !> to the IIS metabase (e.g. IIS://servername/W3SVC) how can I fix it? Since you're using ASP.NET 2.0, all you have to do is run : aspnet_regiis -ga WindowsUserAccount ( from a command line in the .Net framework 2.0.50727 directory ) Also, if you attempted impersonation in web.config, remove the entry. That will make the user default back to whichever default account ASP.NET uses in your OS . If you're using XP , the account is "ASPNET". If you're using Server 2003, the account is "Network Service". If you're using Vista, the account is " Network Service ". You can also attempt to unregister and then re-register the default account ASP.NET uses. To do that, first run : aspnet_regiis -u and then run : aspnet_regiis -i The first ...

What is Software Architecture and Why Architecture is important?

Software Architecture is defined to be the rules, heuristics and patterns governing : ·          Partitioning the problem and the system to be built into discrete pieces ·          Techniques used to create interfaces between these pieces ·          Techniques used to manage overall structure and flow ·          Techniques used to interface the system to its environment ·          Appropriate use of development and delivery approaches, techniques  tools Why it is important? The primary goal of software architecture is to define the non-functional requirements of a system and define the environment. The detailed design is followed by a definition of how to deliver the functional behavior within the architectural rules. Architecture is important because it: · ...

SharePoint 2007 – Hiding fields on NewForm.aspx and EditForm.aspx, the easy way

One of the limiting factors in using the default forms (NewForm.aspx, EditForm.aspx) is that there is no obvious way to hide columns from appearing in the form.  By default all columns in a list or document library will appear in your forms.  After doing quite a bit of research on this I found a fairly easy way to hide fields by using JavaScript within the form pages themselves.  In my research I found several different sets of JavaScript code, but some of the scripts are easier to implement than others.  Below I provide the best and most straight forward JavaScript and some simple steps to guide you along. To hide fields in a SharePoint 2007 form, follow these steps (I will use the NewForm.aspx in my example) Open SharePoint Designer and navigate to the site that contains the list or document library you wish to customize. Expand the folder named “Forms” under the desired list or document library.  You should see about seven .aspx pages (AllItems.aspx,...

How to force timeouts in a Sharepoint intranet site when using Windows Authentication

Background: Security for my sharepoint web site depends on windows authentication. Our workstations are members of the authenticating domain; our users log in to the domain when they access their workstation. The sharepoint web server is also a member of the same domain. One reason I’m blogging this is because I hope to get any misunderstandings I have cleared up by good comments. I was not able to find any setting – either in iis, web.config, any sharepoint site setting, etc that would force a timeout when you use windows authentication. I found posts recommending that people use forms authentication if they really wanted to enforce timeouts. So, why would anybody want timeouts if they are already secured by windows authentication? I think it’s something like the distinction between security and security theater. We had had a problem where our users put up a number of Microsoft office documents, and then each time they attempted to open a doc, they got a windows authentication ...

The new wave in Microsoft technology

Hello guys.. Recently i have attended Microsoft Tech Ed 2010 held at Bangalore.and found extremely interesting and exciting technology trends coming in Ms technologies...below is listing of some of them...I will discuss them in details in coming posts..so keep eye on it Building search engine friendly websites with ASP.NET & IIS 7.5  using url routing Fast and easy deployment using MS deploy Silverlight 4.0 cool -Rich UI RIA services-  all done with 0 lines of code visual studio 2010....making life difficult to developers by making too much simplified development jquery  asp.net mvc now simpler than ever SharePoint 2010..all about collaboration             and much more...get back to you very soon

Backup / Restore Sharepoint Site using STSADM.EXE

How to take backup and restore your sharepoint site...Common Query and Simple Solution.. Follow the below steps Step 1) Go To-----------------------------------------------------------------------------             command prompt and get to the following address where stsadm.exe utility exists C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> Step 2)  For Backup ----------------------------------------------------------------------         C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> STSADM.exe -o backup -url http://infml01190:4444/sites/TEST -filename myfile.dat or STSADM.exe -o backup -url http://infml01190:4444/sites/TEST -filename c:/myfile.dat STSADM.exe -o backup -url http://infml01190:4444/sites/TEST -filename c:/myfile.bak Operation completed successfully. Step 3)  To Restore------------...

Register .XAP file extention in IIS : for Silverlight application

If you are having problems loading a Silverlight 2.0 application, and you have exhausted all options, you may need to register the XAP file extension in IIS. I banged my head against the wall (well, not  really ) trying to figure out why my application wasn’t loading. It turns out to be a simple fix.  Register the MIME type for  .xap  to  application/x-silverlight-app . 1. Go to Start\Administrative Tools and run IIS Manager 2. Right click on the server name and select "Properties" 3. In the Properties Dialog, click on the "MIME Types" button 4. In the "MIME Types" Dialog, click the "New" button 5. In the "MIME Type" Dialog enter one MIME Type at the time: .xap     application/x-silverlight-app .xaml    application/xaml+xml .xbap    application/x-ms-xbap For detailed information on Silverlight, visit  http://silverlight.net/ .