Intelliwins Blog

Anything you wanna know about?

Amazon S3 with Asp.net C# Web Forms

by Admin 25. December 2015 16:39
AWS S3 Storage is one of the most cost effective and efficient available to right now. If you are dealing with large files especially video and audio files which you need to add into website or user RTMP streaming then AWS S3 with Cloud front CDN is one of the best solution available options for a cost effective solution. There are other option may be to hire a server with SSD and loads of RAM and Processor Cores but as I mentioned it won’t be a cost effective one. I personally feel that documentation about amazon AWS integration is not sufficient , that is why I feel to write down this article , which will cover creating a Amazon AWS account (Which also include 5 GB of space for free of cost in AWS S3), Generating API key (Which will be used while integrating SDK) , Adding Amazon SDK (nuget is best option), Configuring and creating amazon S3 bucket, Writing C# codes to upload file from asp.net file upload control to S3 bucket. Creating Amazon AWS Account This quite straight, I think most of us already have an amazon account thanks to e commerce revolution or you can create one very easily. Go to http://console.amazon.com Then sign in with your amazon id and password. Accept few terms and condition. You aws console is ready Generating API key After you log into Amazon AWS console click on your name in top right . Then select Security Credential. In the pop up dialog select Continue with Security Credential. Then click on Access Keys and Click on the button Create New Access Keys. There you can also download the key file. Which is basically a CSV file containing Access Key and Access Secrete Key. Creating Amazon Bucket From Top Left Services menu select S3. Then Click on Create Bucket Button on top of the page and give a name to your bucket and select the region of your bucket. Your S3 bucket will hold all your data. Adding Amazon SDK for asp.net In my view best and easier option is add Amazon SDK is via VS Package Manager Nuget . To Add SDK via nuget. PM > Install-Package AWSSDK.Core -Version 3.1.4.2 And then you need to a AWS S3 SDK PM > Install-Package AWSSDK.S3 -Version 3.1.3.9 All required library has been add to your project. Writing Codes in C# to With Asp.net File upload Control to Upload Files AWS S3 First of all if you are uploading files to amazon S3 then I guess you are dealing with large files or to be precise large media files like image, videos or audio clips. We need to make few changes in the web.config file to enable large file upload without connect being reset . For that we need to add following lines in web.config under . using System; using System.Collections.Generic; using System.Linq; using System.Web; using Amazon; using Amazon.S3; using Amazon.S3.Transfer; /// /// Summary description for AmazonUploader /// public class AmazonUploader { public bool sendMyFileToS3(System.IO.Stream localFilePath, string bucketName, string subDirectoryInBucket, string fileNameInS3) { // input explained : // localFilePath = we will use a file stream , instead of path // bucketName : the name of the bucket in S3 ,the bucket should be already created // subDirectoryInBucket : if this string is not empty the file will be uploaded to // a subdirectory with this name // fileNameInS3 = the file name in the S3 // create an instance of IAmazonS3 class ,in my case i choose RegionEndpoint.EUWest1 // you can change that to APNortheast1 , APSoutheast1 , APSoutheast2 , CNNorth1 // SAEast1 , USEast1 , USGovCloudWest1 , USWest1 , USWest2 . this choice will not // store your file in a different cloud storage but (i think) it differ in performance // depending on your location IAmazonS3 client = new AmazonS3Client("Your Access Key", "Your Secrete Key", Amazon.RegionEndpoint.USWest2); // create a TransferUtility instance passing it the IAmazonS3 created in the first step TransferUtility utility = new TransferUtility(client); // making a TransferUtilityUploadRequest instance TransferUtilityUploadRequest request = new TransferUtilityUploadRequest(); if (subDirectoryInBucket == "" || subDirectoryInBucket == null) { request.BucketName = bucketName; //no subdirectory just bucket name } else { // subdirectory and bucket name request.BucketName = bucketName + @"/" + subDirectoryInBucket; } request.Key = fileNameInS3 ; //file name up in S3 //request.FilePath = localFilePath; //local file name request.InputStream = localFilePath; request.CannedACL = S3CannedACL.PublicReadWrite; utility.Upload(request); //commensing the transfer return true; //indicate that the file was sent } } Then Create a Page Upload.aspx Code for Upload.aspx   Code for Upload.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Data; public partial class upload : System.Web.UI.Page { AmazonUploader obj = new AmazonUploader(); protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { Stream st=FileUpload1.PostedFile.InputStream; obj1.sendMyFileToS3(st, "BucketName", "", FileName); } Now it is done !!! Buy the source code from following link Download

Tags: , , , ,

Asp.net | AWS | AWS S3 | Tips and tricks

Send GCM notification from asp.net C# server

by Admin 2. November 2015 19:35
Google Cloud Messaging Alert From Asp.net C# Sending alerts via a Google Cloud Messaging service is one of the simplest and trickiest things to do in asp.net.  We have tried very simple methods in asp.net to successfully send notifications from server.    You need to know how GCM works. First of all you need to register with Google Cloud Messaging Service Where you need to provide the android app ID and details. Then it provides one API key and you also need the Project ID. You need both of these parameters while sending notifications. One more thing is require that is device id. When the GCM registered app is installed in the android device during registration process a device key and device id is created. We need both of these things while sending notification so that we can direct GCM to send notification for a particular device. We need to save this device ID in a database with our server. We need a web service by using which app developer can send device key and id. To send use the following c# method   public string SendNotification(string deviceId, string message) { string SERVER_API_KEY = "YOUR GCM API Key"; var SENDER_ID = "YOUR Project ID"; var value = message; WebRequest tRequest; tRequest = WebRequest.Create("https://android.googleapis.com/gcm/send"); tRequest.Method = "post"; tRequest.ContentType = " application/x-www-form-urlencoded;charset=UTF-8"; tRequest.Headers.Add(string.Format("Authorization: key={0}", SERVER_API_KEY)); tRequest.Headers.Add(string.Format("Sender: id={0}", SENDER_ID)); string postData = "collapse_key=score_update&time_to_live=108&delay_while_idle=1&data.message=" + value + "&data.time=" + System.DateTime.Now.ToString() + "&registration_id=" + deviceId + ""; Console.WriteLine(postData); Byte[] byteArray = Encoding.UTF8.GetBytes(postData); tRequest.ContentLength = byteArray.Length; Stream dataStream = tRequest.GetRequestStream(); dataStream.Write(byteArray, 0, byteArray.Length); dataStream.Close(); WebResponse tResponse = tRequest.GetResponse(); dataStream = tResponse.GetResponseStream() StreamReader tReader = new StreamReader(dataStream); String sResponseFromServer = tReader.ReadToEnd(); tReader.Close(); dataStream.Close(); tResponse.Close(); return sResponseFromServer; } Any Question Comment Below . Happy Coding !!! 

Tags: , , , , , ,

Android | Asp.net | GCM | Cloud Messaging

Asp.net Image Upload With Crop

by Admin 12. February 2015 22:16
Asp.net image uploader has a very limited scope in uploading image file. We have previously tried our hand in giving the file upload control an option to select the color from the uploaded image. This time we tried to give the option to crop a uploaded image and also resize the image while uploading.   We will user Jquery and Jquery jcrop with asp.net file upload control.  I have also used Master page , Some times master is the culprit in using asp.net controls with jquery.   Masterpage.master  <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder id="head" runat="server"> </asp:ContentPlaceHolder> <style> #load { position: absolute; left: 35%; top: 38%; position:fixed; height: 200px; width: 300px; z-index: 1000; margin:-25px 0 0 -25px; display:none; background-color: #FFF; padding: 30px 40px 34px; -moz-box-shadow: 0 0 10px rgba(0,0,0,.4); -webkit-box-shadow: 0 0 10px rgba(0,0,0,.4); -box-shadow: 0 0 10px rgba(0,0,0,.4); } .bg { position: fixed; height: 100%; width: 100%; background: #000; background: rgba(0,0,0,.8); z-index: 100; display: none; top: 0; left: 0; } .fle { display:none !important; } </style> <link href="CSS/Style.css" rel="stylesheet" type="text/css" /> </head> <body> <form id="form1" runat="server"> <div> <div id="load"> <div style="width:100%;text-align:center; padding-top:20px;"><h5>Loading....</h5></div> <div align="center" style="padding-top:30px;"> <img src="images/ajax-loader.gif" /></div> </div> <div class="bg"></div> <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </form> </body> </html>      Default.aspx <%@ Page Title="" Language="C#" ClientIDMode="Static" MasterPageFile="MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> <link href="CSS/bootstrap.css" rel="stylesheet" type="text/css" /> <link href="CSS/jquery.Jcrop.min.css" rel="stylesheet" type="text/css" /> <script src="js/jquery.min.js" type="text/javascript"></script> <script src="js/jquery.Jcrop.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { //Intialize JCROP $('#imgCrop').Jcrop({ onSelect: storeCoords }, function () { jcrop_api = this; //Setting Aspect Ratio jcrop_api.setOptions({ aspectRatio: 2 / 1 }); }); //Loading Box $(document).keyup(function (event) { if (event.which === 27) { $('#load').hide(); $(".bg").hide(); } }); function xy() { $("#load").fadeIn("slow"); $(".bg").show(); setTimeout(function () { $('#load').fadeOut("slow"); $(".bg").hide(); }, 10000); } $('.upl').click(function () { xy(); }); $(".fle").on('change', function () { $("#btn_up").click(); }); }); function storeCoords(c) { //Co ordinates from JCROP $('#X').val(c.x); $('#Y').val(c.y); $('#W').val(c.w); $('#H').val(c.h); }; </script> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <div class="container"> <div class="row"> <div class="col-md-10 frm"> <h3>Options</h3> <asp:Panel ID="pnlupl" runat="server" Visible="true" CssClass="form-inline"> <asp:FileUpload ID="Upload" runat="server" CssClass="fle"/> <asp:Button ID="Button1" runat="server" Text="Browse" CssClass="btn btn-warning" /> <asp:Button ID="btn_up" runat="server" Text="Upload" class="upl" onclick="btn_up_Click" CssClass="btn btn-success" style="display:none;" /> <asp:Button ID="btnCrop" runat="server" Text="Crop" class="upl" OnClick="btnCrop_Click" CssClass="btn btn-danger" /> <asp:Label ID="lblError" runat="server" Visible="false" /> </asp:Panel> </div> </div> <div class="row"> <div class="col-md-10 frm"> <h4>Image <span class="text-danger">(Crop Aspect Ratio 2:1)</span> </h4> <asp:Panel ID="pnlCrop" runat="server" Visible="false"> <asp:Image ID="imgCrop" runat="server" CssClass="img-responsive" /> <asp:Image ID="imgCropped" runat="server" /> <br /> <asp:HiddenField ID="X" runat="server" /> <asp:HiddenField ID="Y" runat="server" /> <asp:HiddenField ID="W" runat="server" /> <asp:HiddenField ID="H" runat="server" /> </asp:Panel> </div> </div> </div> </asp:Content> Default.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using SD = System.Drawing; using System.Drawing.Imaging; using System.Drawing.Drawing2D; public partial class _Default : System.Web.UI.Page { String path = HttpContext.Current.Request.PhysicalApplicationPath + "images\\"; String tpath = HttpContext.Current.Request.PhysicalApplicationPath + "thumb_img\\"; protected void Page_Load(object sender, EventArgs e) { //Set button to open upload box Button1.Attributes.Add("onclick", "jQuery('#" + Upload.ClientID + "').click();return false;"); //It is mck the opening of file upload control } protected void btn_up_Click(object sender, EventArgs e) { Boolean FileOK = false; Boolean FileSaved = false; if (Upload.HasFile) { Session["WorkingImage"] = Upload.FileName; String FileExtension = Path.GetExtension(Session["WorkingImage"].ToString()).ToLower(); String[] allowedExtensions = { ".png", ".jpeg", ".jpg", ".gif" }; for (int i = 0; i < allowedExtensions.Length; i++) { if (FileExtension == allowedExtensions[i]) { FileOK = true; } } } if (FileOK) { try { Upload.PostedFile.SaveAs(MapPath("images/") + Session["WorkingImage"]); //Save Original Image System.Drawing.Image img1 = System.Drawing.Image.FromFile(MapPath("images/") + Session["WorkingImage"]); int xx = img1.Width; int yy = img1.Height; double y = Convert.ToDouble(yy); int wid = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["width"]); double hi = (y / xx) * wid; int h = (int)hi; System.Drawing.Image bmp1 = ResizeImage(img1, wid, h); var bmp2 = new SD.Bitmap(bmp1); bmp2.Save(MapPath("images/") + "resized" + Session["WorkingImage"]);//Save Resized Image FileSaved = true; } catch (Exception ex) { lblError.Text = "File could not be uploaded." + ex.Message.ToString(); lblError.Visible = true; FileSaved = false; } } else { lblError.Text = "Cannot accept files of this type."; lblError.Visible = true; } if (FileSaved) { pnlCrop.Visible = true; imgCrop.ImageUrl = "images/resized" + Session["WorkingImage"].ToString(); imgCrop.Visible = true; imgCropped.Visible = false; } } protected void btnCrop_Click(object sender, EventArgs e) { try { string ImageName = "resized" + Session["WorkingImage"].ToString(); int w = Convert.ToInt32(W.Value); int h = Convert.ToInt32(H.Value); int x = Convert.ToInt32(X.Value); int y = Convert.ToInt32(Y.Value); byte[] CropImage = Crop(MapPath("images/") + ImageName, w, h, x, y); using (MemoryStream ms = new MemoryStream(CropImage, 0, CropImage.Length)) { ms.Write(CropImage, 0, CropImage.Length); using (SD.Image CroppedImage = SD.Image.FromStream(ms, true)) { string SaveTo = MapPath("images/") + "crop" + ImageName; CroppedImage.Save(SaveTo, CroppedImage.RawFormat); imgCrop.Visible = false; imgCropped.Visible = true; imgCropped.ImageUrl = "images/crop" + ImageName; } } } catch (Exception) { } } static byte[] Crop(string Img, int Width, int Height, int X, int Y) {//Crop image according to selected cordinate try { using (SD.Image OriginalImage = SD.Image.FromFile(Img)) { using (SD.Bitmap bmp = new SD.Bitmap(Width, Height)) { bmp.SetResolution(OriginalImage.HorizontalResolution, OriginalImage.VerticalResolution); using (SD.Graphics Graphic = SD.Graphics.FromImage(bmp)) { Graphic.SmoothingMode = SmoothingMode.AntiAlias; Graphic.InterpolationMode = InterpolationMode.HighQualityBicubic; Graphic.PixelOffsetMode = PixelOffsetMode.HighQuality; Graphic.DrawImage(OriginalImage, new SD.Rectangle(0, 0, Width, Height), X, Y, Width, Height, SD.GraphicsUnit.Pixel); MemoryStream ms = new MemoryStream(); bmp.Save(ms, OriginalImage.RawFormat); return ms.GetBuffer(); } } } } catch (Exception Ex) { throw (Ex); } } public static SD.Image ResizeImage(SD.Image image,int height,int width) { int newWidth; int newHeight; newWidth = height; newHeight = width; SD.Image newImage = new SD.Bitmap(newWidth, newHeight); using (var graphicsHandle = SD.Graphics.FromImage(newImage)) { graphicsHandle.InterpolationMode = InterpolationMode.HighQualityBicubic; graphicsHandle.SmoothingMode = SmoothingMode.HighQuality; graphicsHandle.PixelOffsetMode = PixelOffsetMode.HighQuality; graphicsHandle.DrawImage(image, 0, 0, newWidth, newHeight); } return newImage; } } Download Source

Tags: , , , , ,

Asp.net | Jquery | Web design

Paypal NVP API with Asp.net and C#

by Admin 23. July 2014 16:34
Paypal has always play a major role in online payment scenario and e commerece .Paypal has provided various API and way of payment. In this article we will explore the use of NVP API of Paypal with Asp.net and C#. Before we can start we need to remember few things. We need to create a Paypal merchant account. Then we need to create a API credential with paypal . There we can get API username, API password and API Signature.  Then download paypalfunction.cs file from following link Then place the file into App_Code folder and open the file in visual studio and replace the API username, API password and API signature with your API credentials. Then write down on the page where you want the payment   protected void btn_proceed_Click(object sender, EventArgs e)     {        NVPAPICaller test = new NVPAPICaller();        string retMsg = "";        string token = "";        Session["payment_amt"] = txt_cost.Text;        if (HttpContext.Current.Session["payment_amt"] != null)        {            string amt = HttpContext.Current.Session["payment_amt"].ToString();              bool ret = test.ShortcutExpressCheckout(amt, ref token, ref retMsg);                    if (ret)            {                HttpContext.Current.Session["token"] = token;                Response.Redirect(retMsg);            }            else            {                Response.Redirect("APIError.aspx?" + retMsg);            }        }        else        {            Response.Redirect("APIError.aspx?ErrorCode=AmtMissing");        } } Download the APIError.aspx and APIError.aspx.cs by clicking on the link This will redirect to paypal page where user need to enter his/her paypal credential of the account where he need to pay for the product.   Then there is a Confirmation page for the user. The URL of this confirmation page can be configured from the paypalfunction.cs file. Check return URL and change it In this page we have option to show user his final payment value and then shipping address. Also a button as pay after clicking on it the payment will be done through paypal. Codes under page_load to show final amount and shipping address.  protected void Page_Load(object sender, EventArgs e)     {            String PaymentOption = "PayPal";         if (PaymentOption == "PayPal")         {             NVPAPICaller test = new NVPAPICaller();               string retMsg = "";             string token = "";             string payerId = "";             string shippingAddress = "";             string amt = "";             token = Session["token"].ToString();               bool ret = test.GetShippingDetails(token, ref payerId, ref shippingAddress, ref retMsg,ref amt);             if (ret)             {                 Session["payerId"] = payerId;                 lbl_prc.Text = amt;                                 addrs.InnerHtml = shippingAddress;             }             else             {                 Response.Redirect("APIError.aspx?" + retMsg);             }         }     } Code Under Pay button to make the payment    protected void Button1_Click(object sender, EventArgs e)     {         String PaymentOption = "PayPal";         if (PaymentOption == "PayPal")         {             NVPAPICaller test = new NVPAPICaller();               string retMsg = "";             string token = "";             string finalPaymentAmount = "";             string PayerId = "";             NVPCodec decoder = new NVPCodec();               token = Session["token"].ToString();             PayerId = Session["payerId"].ToString();             finalPaymentAmount = Session["payment_amt"].ToString();               bool ret = test.ConfirmPayment(finalPaymentAmount, token, PayerId, ref decoder, ref retMsg);             if (ret)             {                 // Unique transaction ID of the payment. Note:  If the PaymentAction of the request was Authorization or Order, this value is your AuthorizationID for use with the Authorization & Capture APIs.                  string transactionId = decoder["PAYMENTINFO_0_TRANSACTIONID"];                   // The type of transaction Possible values: l  cart l  express-checkout                  string transactionType = decoder["PAYMENTINFO_0_TRANSACTIONTYPE"];                   // Indicates whether the payment is instant or delayed. Possible values: l  none l  echeck l  instant                  string paymentType = decoder["PAYMENTINFO_0_PAYMENTTYPE"];                   // Time/date stamp of payment                 string orderTime = decoder["PAYMENTINFO_0_ORDERTIME"];                   // The final amount charged, including any shipping and taxes from your Merchant Profile.                 string amt = decoder["PAYMENTINFO_0_AMT"];                   // A three-character currency code for one of the currencies listed in PayPay-Supported Transactional Currencies. Default: USD.                     string currencyCode = decoder["PAYMENTINFO_0_CURRENCYCODE"];                   // PayPal fee amount charged for the transaction                     string feeAmt = decoder["PAYMENTINFO_0_FEEAMT"];                   // Amount deposited in your PayPal account after a currency conversion.                     string settleAmt = decoder["PAYMENTINFO_0_SETTLEAMT"];                   // Tax charged on the transaction.                     string taxAmt = decoder["PAYMENTINFO_0_TAXAMT"];                   //' Exchange rate if a currency conversion occurred. Relevant only if your are billing in their non-primary currency. If                  string exchangeRate = decoder["PAYMENTINFO_0_EXCHANGERATE"];                 obj.upt_clint(token, transactionId);                 obj.save_trans(transactionId, transactionType, paymentType, orderTime, amt, feeAmt, settleAmt, taxAmt);                 //redirect to final thank you page after payment done                 Response.Redirect("thanks.aspx");             }             else             {                 Response.Redirect("APIError.aspx?" + retMsg);             }         }     }

Tags: , , ,

Asp.net | Payment Gateway | Tips and tricks

Extending Image Uploader with Preview and Color Selector in Asp.net

by Admin 28. April 2014 13:12
Even if asp.net default file upload control is a very powerful tool but it comes with some limitations. In this tutorial we will discuss in depth about it and way to overcome it. Limitations No Support fro Customized Button or Use of CSS Classes: Even if is a very powerful control we can't customize it with CSS classes like we can't change the text in the browse button or can't hide the textbox or apply css class to button.  No Support for image preview:  we can't preview image before uploading No validation fro file type or size No Color selector To overcome this we have extended the functionality of this control using Javascript and Jquery. Here you can customize the  button for upload, preview image, validation for image file with size. GUID support for file name and Color selection from uploaded image and stored the selected color and image to database. You can check the demo below and download the full source code   DEMO        DOWNLOAD 

Tags: , ,

Asp.net | Jquery | Tips and tricks

PHP Vs ASP.net Infographics

by Admin 11. April 2014 17:41
It comes down to the final battle for most popular server side web development technology. It is a well known fact that PHP is the most popular web development technology riding high on its open source credentials and popular CMS and Blogging frameworks like wordpress,Joomla or Magento. But microsoft's Asp.net is also gaining traction and this infograph represent it.   So the on final word if a user looking for a customized web application development with enhanced security, it is asp.net , But if client looking for CMS system and a ultra low cost feature rich website , i think PHP is a better option.

Tags: , , ,

Asp.net | PHP

Top 5 Useful Websites For Asp.net Development

by Admin 7. November 2013 17:39
Today Asp.net is one of the biggest web development framework with a very large developer community. Even though we have several websites where you can get help during Asp.net development but we have prepared a list of Top 5 websites where you can get Solutions to your issues, Find sample codes and ask other developers for help.   5. Codeplex This is a Opensource Project Hosting Website backed by Microsoft . Here you can find different Asp.net Sample projects with source code. Also you can get various plugin used during Asp.net. This is a website where you can find community edition of different Asp.net based applications with source and Off course Free of Cost. Isn't that great?? 4. MSDN Magazine MSDN Magazine is the official magazine from the creators of Asp.net so you can call it as Bible of Asp.net. They are very strict at choosing the content which published. Each article is very long and depth than any other website. But you can assured that these articles are well picked before print. 3. 4GuysFromRolla If you are a web developer and better be a Asp.net developer then this is a must visit website. Here you can find solution to your most of the problems. They also a lot of useful tips because they are still developers using Asp.net. 2. Code Project Well i can't count how many times i have downloaded the code from this website., And believe me these codes are written by real life developers. The useful articles always include a sample code to download. You can even post you article and code in this website , In return you can get the approval of site community. 1. Stackoverflow Finally we come to the Numero Uno and Without any guesses it is Stack overflow. Not only for Asp.net you can get help from this website each and every development technology. Be it Django Phython or ROR you name it and solution is here. Just you need to is log into the website using diffrent open id like Google,facebook etc. Then post your Questions, and with a blink the answer is here supported by largest developer community . The answer are straight to point. Be it Asp.net,C#,VB or Jquery. Another interesting feature is you can earn badges and points. If anyways your question goes unanswered you can also place a bounty from your points. Isn't it cool. In my view this is best website for any kind of development.   These are few website we have used maximum during our development. Few other websites are also there like Dotnetperl which is very helpful for beginners . If you find out any other website post in the comments !!! Happy Coding  

Tags: , ,

Asp.net | Tips and tricks

Customize Blogengine.net (Beginner's Guide)

by Admin 22. October 2013 12:41
Blogengine.net is a pretty handy blogging engine based on asp.net platform. The stand out feature is how simple and easy to deploy tool it is? I got a opportunity to work on this platform and believe me it very simple and highly customizable and one more thing is that as it is based on Asp.net web forms , it is very helpful for beginners to work on it straight away. I can say that it might not be as feature rich as wordpress but it is a development curve which will make it a more featured and robust platform as it is very new platform compared to Wordpress and different plugins are added day by day. As the admin section is very user friendly and you don’t feel missing something, but what you need the most is customizing the template.Blogengine.net comes with few default themes or you can go to the store to choose appropriate theme for your website. If you requirement is very specific and you need a customized theme then also you can create your own theme in an hour by following these steps. Go to blogengine.net directory (You can download blogengine for free from this link) Search for themes directory. Then inside themes folder you can find number of directory named as each template. You just right click and create a new folder inside themes folder and name it as your template name. Then go to Standard folder and copy all the files inside that folder Then open your newly created folder and paste all the file inside that folder. Then copy all the css and image file to the newly created theme folder . Then open site.master file in visual studio 2010 and replace the css and JS link with you new css and JS. Also put you own static html content inside body.Put  <asp:ContentPlaceHolder ID="cphBody" runat="server" /> inside appropriate position on the body where you want the blog to be displayed. And you theme is ready Then got to admin panel of blogengine.net by running the website and type /admin after your default url, Default user id: admin and password: admin , you can change it after login Then go to customize in the upper menu and select theme Now you can see different themes with one created by you . the theme name is same as folder name. Select that theme and now open your blog. You blog is ready to rock!!  

Tags: , , ,

Asp.net | BlogEngine.NET | Tips and tricks

High CPU Utilization When Running Wpf(Windows Presentation Foundation) Application.

by Admin 23. September 2013 13:57
Symptoms: While running WPF application on .net framework 3.0 or 3.5 you sometimes receive a File exception format exception error or Argument out of range exception. Sometimes a file Wpf_fontcache.exe with almost 100% CPU utilization while looking at task manager.  Cause: Outdated Video driver which overwrites font cache stored in memory.  Solution:   Close All WPF based Application Stop Windows Presentation Foundation Font Cache Service from Control Panel Services.msc. Delete Fontcache dat file (Note: It is located in %windir%\ServiceProfiles\LocalService\AppData\Local folder in Windows Vista and Win 7 by default , %systemdrive%\Documents and Settings\LocalService\Local Settings\Application Data folder in Windows XP and in earlier versions of Windows. ) This is only for the temporary solution. For permanent solution download and update the latest video driver.

Tags: , ,

Asp.net | WPF

Seo Friendly URL Redirection On Asp.net Web Forms

by Admin 21. September 2013 14:06
On Asp.net 3.5 sp1 onward microsoft has given facility for URL Routing . You just have to include few codes into Global.asax. After URL Routing Your URL Will look more human and search engine friendly. If you URL is www.example.com/page.aspx?id=about  it will look like www.example.com/page/about . Extension less and SEO Friendly . For that we have to add Global.asax into our project . Then import System.Web.Routing   <%@ Import Namespace="System.Web.Routing" %>  Then we have to write code for URL redirection inside Global.asax.   void registerroute(RouteCollection routes) { routes.MapPageRoute( "Home-Route", "Home", "~/Default.aspx" ); }  This is for Static Pages with out query strings. For Webpages with query string like www.example.com/page.aspx?id=about   The code would be: routes.MapPageRoute( "Page-Route", "Pages/{page}", "~/page.aspx" );The New Seo Friendly URL looks like www.example.com/pages/about To access the attached query string string pg = Page.RouteData.Values["page"] as string; Hope this will solve one of the biggest headache for Asp.net web forms . Happy Coding !!!!  

Tags: , ,

Asp.net | Url redirection

Brit Colony, Bhubaneswar,India +91 94384 80191 info@ intelliwins.com

About Us

Intelliwins mission is to alter the dynamics of the software industry by providing trusted, supportive and quality software development servies to clients that view our partnership as a strategic driver for their success.

Newsletter

Enter your email to join our mailing list