Skip to main content

Posts

Showing posts from 2014

Force Visual Studio to always run as an Administrator in Windows 8

Dear All It's a small issues for developer but a headache for every time during development once vs stop and ask for restart with different user credential here is a solution for it  Please follow the below step to make your VS run with administrator In Windows 8, you have to right-click devenv.exe and select "Troubleshoot compatibility". select "Troubleshoot program" check "The program requires additional permissions" click "Next", click "Test the program..." wait for the program to launch click "Next" select "Yes, save these settings for this program" click "Close" I hope it resolve your problem  Regards Rashid Imran Bilgrami 

SQL DB Stuck during Take Offline

Dear All, If your database Take offline process has stuck then don't worry just follow the below steps and you will make your database offline: Steps 1) Run the following command EXEC sp_who2 2) List down the SPID # run again your database column (DBNAME) 3) kill the process... 4) Once you kill all the processes then run the following command ALTER DATABASE [myDB] SET OFFLINE WITH ROLLBACK IMMEDIATE After that your datbase goes offline, now  you will make a copy for it There is another process if you have many process runing to gather you can use below query DECLARE @DatabaseName nvarchar(50) SET @DatabaseName = N'Write your database name' DECLARE @SQL varchar(max) SET @SQL = '' SELECT @SQL = @SQL + 'Kill ' + Convert(varchar, SPId) + ';' FROM MASTER..SysProcesses WHERE DBId = DB_ID(@DatabaseName) AND SPId <> @@SPId EXEC(@SQL) ALTER DATABASE [Write your database name] SET OFFLINE WITH ROLLBACK IMMEDIATE GO Regard...

Encrypt Web.config in DNN or ASP.net web application

Granting Read Access to an RSA Encryption Key Step 1: Go to the appropriate framework directory for the ASP.NET files:cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Step 2: From here we can grant read access to an RSA encryption key by running this command:.\aspnet_regiis.exe -pa "NetFrameworkConfigurationKey" "IIS APPPOOL\MySite" How to Identify the APP  Pool "IIS APPPOOL\MySite" is the identity that my App Pool runs under. If you don't know what yours is, create an .aspx file in your website with the following content: <%@ Page Language="C#" %>  <% Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name); %> Encrypting Sections of the Web.config File At this point, we are ready to run the command that will actually encrypt the web.config.  MAKE SURE THAT YOU HAVE A BACKUP OF ALL THE DATA STORED IN THE SECTION YOU ARE ABOUT THE ENCRYPT. .\aspnet_regiis.exe -pe "connectionStr...

How to get DNN user profile pic in your custom Module

How to get your user profile pic in DNN module here is the code  protected void Page_Load(object sender, EventArgs e)         {                       PortalModuleBase myportalInfo = new PortalModuleBase();             Literal1.Text = myportalInfo.UserInfo.Profile.PhotoURL;                   } I hope it helps you and save your time Regards Rashid Imran Bilgrami http://www.bestvisualization.com

DNN:Text return Nothing or Skin Token is not working with DNN:Text

Dear All,  Today i found a  problem when i render the DNN skin object with DNN:Text then it will return nothing, i register the object <%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/Admin/Skins/Text.ascx" %> then i place the DNN text object with token <dnn:TEXT runat="server" id="TEXT1" Text="[Tab:TabName]" CssClass="NormalBold" ReplaceTokens="True" /> but there is no luck then i found when the ascx.cs file and checked out the code in detail and i found the variable that use in the cs file is ShowText instead of Text.  Here if you did not get the return value from dnn:Text in dnn 7.3 version then use the following skin object  <dnn:Text runat="server" id="CheckingOne2" ShowText="[User:FullName]" ReplaceTokens="True"/> Note in above like there is ShowText instead of Text  I hope it save your time because it already eat my ...

Javascript not working with support partially or partial post back in DNN

Dear All, Today i found a solution finally to rebind the Javascript issue with support partially run with DNN Here is the key <script type="text/javascript">     function BindControlEvents() {         //jQuery is wrapped in BindEvents function so it can be re-bound after each callback.         //Your code would replace the following line:             $('#<%= TextProtocolDrugInstructions.ClientID %>').limit('100', '#charsLeft_Instructions');               }     //Initial bind     $(document).ready(function () {         BindControlEvents();     });     //Re-bind for callbacks (This is a key)     var prm = Sys.WebForms.PageRequestManager.getInstance();     prm.add_endRequest(function() {         BindControlEvents();     }); </scrip...

DNN 7 Localization Video or Tutorial. How to enable DNN localization in DNN7

Dear All,  Here is the video for the DNN 6+ Localization Regards Rashid Imran Bilgrami http://www.bestvisualization.com

Automatically change input mode in to Arabic

Dear All, Today i found a good solution if you have a form and you want to automatically change the input mode in to arabic then here is a sample code: Copy the following script <script type="text/javascript"> //<![CDATA[ function TextLanguageAr(e, input) { var unicode = e.which;         switch (unicode) {             case 192: input.value += 'Ø°';   return false; break;                case 81: input.value += 'ض';   return false; break;                case 87: input.value += 'ص';   return false; break;                   case 69: input.value += 'Ø«';   return false; break;                   case 82: input.value += 'Ù‚';   return false; break;                   case 84: if (Shift_Key...

How to extend windows server 2012 standard r2 and standard evaluation version

Dear All, Here is a way if your window server has expired you can extend it Click Start, and then click Command Prompt. Type slmgr.vbs -dli, and then press ENTER to check the current status of your evaluation period. To reset the evaluation period, type slmgr.vbs –rearm, and then press ENTER. Restart the computer. I hope it give you more time to find suitable crack ;)  Regards  Rashid Imran Bilgrami  http://www.bestvisualization.com 

Site Setting giving error in DNN 7.3.1 (Admin > Site Settings - Critical Error )

Hi Today i found the solution for DNN 7.3.1 Bug. When you tried to access the Admin > Site Settings you will find the critical error Message: DotNetNuke.Services.Exceptions.PageLoadException: Selection out of range Parameter name: value ---> System.ArgumentOutOfRangeException: Selection out of range Parameter name: value    at Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource)    at Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data)    at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)    at Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e)    at Telerik.Web.UI.RadComboBox.PerformSelect()    at System.Web.UI.WebControls.BaseDataBoundControl.DataBind()    at Telerik.Web.UI.RadComboBox.DataBind()    at DotNetNuke.Web.UI.WebControls.DnnSkinComboBox.OnLoad(EventArgs e)   ...

How to read DNN custom user profile properties

Dear All, here is a function for getting DNN user profile properties (Note it's only working with DNN6.0+ versions) //Import these two classes using DotNetNuke.Entities.Profile; using DotNetNuke.Entities.Users; //Place this function  protected string GetProfilePropertyValue(string propertyName)         {             string value;             ProfilePropertyDefinition ppd = UserInfo.Profile.GetProperty(propertyName);             if (ppd == null)             {                 value = "";             }             else             {                 value = ppd.PropertyValue;                 if (value == null)   ...

How to enable cotnent localization in DNN 6 & 7

Dear All,  Check out how to enable the content localization in DNN 6 and 7  Regard Rashid Imran BIlgrami http://www.bestvisualization.com

Page Setting Error in DNN with Arabic Language Error :Valid values are between 1318 and 1500, inclusive. Parameter name: year

Dear All, Today i found a solution for the problem of DNN Arabic Localization Error. In DNN 6.0 and + when we install the DNN it gives an issue under page setting the error is some thing like this InnerException:Valid values are between 1318 and 1500, inclusive. Parameter name: year Message:DotNetNuke.Services.Exceptions.PageLoadException: Valid values are between 1318 and 1500, inclusive. Parameter name: year ---> System.ArgumentOutOfRangeException: Valid values are between 1318 and 1500, inclusive. Parameter name: year etc .... you can get rid of this problem by following below steps: Step 1: Open DNN installed directory Step 2: Open following folder location : DNNDIRECTORY\DesktopModules\Admin\Tabs Step 3: Open ManageTabs.ascx  Step 4: Copy and past following line between Register controls and <Div>code  <%     startDatePicker.Culture = new System.Globalization.CultureInfo("en-US");     endDatePicker.Culture = ne...

Create Your Own Keep Alive Service

Dear All  You can create your own keep alive service by blow code (Note i got this code but it still not tested yet)  original post  http://al-atari.net/?p=569 Imports System.IO Imports System.Net Imports System.Text Imports System.Net.Mail Module Startup     Sub Main()         Call CheckOneSite("http://www.part-time-work-at-home-opportunities.com/keepalive.aspx")         Call CheckOneSite("http://www.site2.com")         Call CheckOneSite("http://www.site3.com")         Call CheckOneSite("http://www.siten.com")     End Sub     Private Sub CheckOneSite(ByVal pUrl As String)         Try             ' Create a request for the URL.                      Dim lRequest As WebRequest = WebRequest.Create(pUrl)   ...

Keep Alive Free Websites

Dear All, Here are the free website for pinging the DNN website for better performance. http://www.dnnmonitor.com/ http://www.pingalive.com/ http://www.mandeeps.com/ Regards Rashid Imran Bilgrami http://www.bestvisualization.com 

What is Server.Transfer In .net or Server.Transfer vs Response.Redirect

Dear All, Here is a detail video about Server.Transfer vs Response.Redirect command I hope it helps you alot  Regards  Rashid Imran Bilgrami  CEO Best Visualization http://www.bestvisualization.com  

SQL Agent disabled / how to enable SQL agent

Dear Readers, Today i found that SQL agent is disabled and i can active through the below process First you can check first these points Go to run type services.msc Right click on the SQL Server Agent (MSSQLSERVER) Then check in the properties your startup type might be disabled change it to automatic or manual and try again it will enable the start option If the above process not workable then check this one SQL Server blocked access to procedure 'dbo.sp_get_sqlagent_properties' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online. You need to run the following script under you SQL management Studio 1) Open the new query 2) Past the code sp_configure 'show ...

Autonumber in select statement in SQL Server

Dear Friends You can identify the autonumber with SQL query through  ROW_NUMBER: Here is a query SELECT ROW_NUMBER() OVER (ORDER BY col1) AS rn, * FROM tbl1 To filter the results based on the row number use this: SELECT * FROM (     SELECT ROW_NUMBER() OVER (ORDER BY col1) AS rn, * FROM tbl1 ) T1 WHERE rn = 5 I hope it will help you Regards Rashid Imran Bilgrami http://www.bestvisualization.com

Import Arabic Content From external file Maillist King / Send a blaster Email Program

Dear All If you are facing a problem to import unicode language character  like arabic, russian, german or any other (like ????) during importing the user list and sending email in sendblaster email program or maillist king program then flow the below step to get rid of this issue To solve this sort of encoding problems, simply make sure your language is used both for codepage and for number / dates format. Display language is not relevant. In short, please follow these basic instructions: Open Windows Control Panel, Regional and Language Options, and make sure that 1) in “Format” tab, the format for numbers and dates is set to your language (for example Arabic) – not to English or any other language. 2) In “Advanced” (WinXP) or “Administrative” (Vista, Win7) tab, the “Language for non-Unicode programs” is set to your language (for example Arabic). Changing this will require re-starting your PC. Finally, when you compose your message, choose Unicode charset and make so...

How to use left, right & substring in SQL with String Dynamic Length

Dear Reader Here is an example for how to use Left, right and substring function in SQL Using Right with Reverse String SELECT RIGHT([String],CHARINDEX('%',REVERSE([String]),0)-1) Using Left with String select Left([String],CHARINDEX('%',[String],0)-1) Using SubString with String select Substring([String],0,CHARINDEX('%',[String],0)) Regards Rashid Imran Bilgrami http://www.bestvisualization.com