SB Admin 2 Bootstrap Theme – Visual Studio 2017

I have updated the SB Admin 2 theme to match with Visual Studio 2017 . I have also updated all the nuget packages related. Features SB Admin 2 Bootstrap admin theme, dashboard template, or webapp UI starter. The theme features a variety of custom jQuery plugins to add extended functionality past the built in Bootstrap UI features. Live Preview : https://blackrockdigital.github.io/startbootstrap-sb-admin-2/pages/index.html Mode Details : https://startbootstrap.com/template-overviews/sb-admin-2/ Download From GitHub: https://github.com/haneefputtur/HaneefSBAdmin2  

» Read more

SignalR – Real-time web communication between Client and Server Easy c# [Part 1 of 2]

What is SignalR ? ASP.NET SignalR is a new library for ASP.NET developers that makes developing real-time web functionality easy. SignalR allows bi-directional communication between server and client. Servers can now push content to connected clients instantly as it becomes available. SignalR supports Web Sockets, and falls back to other compatible techniques for older browsers. SignalR includes APIs for connection management (for instance, connect and disconnect events), grouping connections, and authorization. Features of this exercise after you complete: # Send real time message to client without client refreshing the page # Receive real time communication or message from client without refreshing the page. #Send message to all connected clients. # Send message to specific client. # Send message to all client except one who sent it… # This is a proof of concept …. you can extend it to the way you want…   How to Install SignalR to MVC C# ? Steps : Open Visual Studio 2015 Create New MVC Project Install SignalR from Nuget Package  – Install-Package Microsoft.AspNet.SignalR -Version 2.2.2 Create SignalR Hub Create Owin Startup File Create A view and include SignalR library reference Test the Application Extend the functionality to the ActionMethod       Testing the […]

» Read more

SignalR & Oracle DB Change Notification [Part 2 of 2]

What is Oracle change Notification ? The Oracle Data Provider for .NET provides a notification framework that supports Database Change Notification in the database server. Database Change Notification enables applications to receive notifications from a registered callback routine when there is a change in a query result set, schema objects, or the state of the database that could affect the results of a cached client result set. Using this feature in ODP.NET, an application can maintain the validity of the client-side cache (for example, the ADO.NET DataSet) easily. The client does not need to maintain a connection to the database. It will receive notifications even when no longer connected to the database. This feature is intended for queries whose results change infrequently over time and for those who cannot maintain a large number of active database connections. Features you get after you complete this tutorial # Send real time message to any user for change in DB # Alert about the operation like update / insert / delete # Alert about any changes based on the SELECT statement defined. # Functionality can be extended to any ticket selling systems, room booking systems where you wish to block the booking based […]

» Read more

Error Could not load file or assembly ‘System.Net. ASP.NET MVC C#

Error : Could not load file or assembly ‘System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not load file or assembly ‘System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified. Solution : To resolve this issue before you publish the file make sure you select Copy Local to True from False If the dll property of the file — copy local is  false means the file will not be copied to bin folder while publishing. Set it to true so that file will be copied to bin folder Screenshot before error:   Solution     This will copy the dlls while publishing to Bin folder      

» Read more

Rotativa :: HTTP Error 401.2 – Unauthorized You are not authorized to view this page

Scenario Using Rotativa as PDF convertor in ASP.NET MVC C# with Active directory login authentication Problem HTTP Error 401.2 – Unauthorized You are not authorized to view this page due to invalid authentication headers Cause : If you use Rotativa.ActionAsPDF it will not pass the header values related to authentication to the new page. So option is to use Rotativa.PartialViewAsPdf Sample Code:   public ActionResult ConvertToPDF(string stdId, string vid) { TestModel model = dbfunctions.GetTestValue(stdId, vid); // send model as partial View Pdf not return new Rotativa.PartialViewAsPdf(“TestPDF”, model); } public ActionResult TestPDF(TestModel model) // model with values { // PartialView(pdf) not View(pdf); return PartialView(model); }          

» Read more

Error installing NuGET Packages Visual Studio 2013 – already has a dependency defined for xxxx

When you install new nuget packages you receive error as below.     In order to resolve this follow this steps.   Close Visual Studio Download Latest version of NuGet Package Manage and Install https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2013 Step 3: After installation open the Visual Studio and try to install NuGet Package!!!    

» Read more

Install Oracle DB Express and Connect to ASP.Net MVC C# Using Dapper and ODP.net

Tools Used : Oracle DB Express Toad for Oracle ( To explore database– You can also user Oracle Developer)  Visual Studio .net 2013 This tutorial covers following points. Install Oracle DB Express.  ==< Link http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html Create a user  — Refer my post => Create user and Schema Create a Schema — Refer my post => Create user and Schema Create a Table ALTER TABLE HPUTTUR.EMPLOYEE DROP PRIMARY KEY CASCADE; DROP TABLE HPUTTUR.EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE HPUTTUR.EMPLOYEE ( EMPLOYEE_ID NUMBER NOT NULL, EMPLOYEE_NAME VARCHAR2(200 CHAR) NOT NULL, EMPLOYEE_MOBILE VARCHAR2(50 BYTE) NOT NULL, EMPLOYEE_DEPARTMENT VARCHAR2(50 BYTE) NOT NULL ) TABLESPACE SYSTEM RESULT_CACHE (MODE DEFAULT) LOGGING NOCOMPRESS NOCACHE NOPARALLEL MONITORING; CREATE UNIQUE INDEX HPUTTUR.EMPLOYEE_PK ON HPUTTUR.EMPLOYEE (EMPLOYEE_ID) LOGGING TABLESPACE SYSTEM NOPARALLEL;  CREATE OR REPLACE TRIGGER HPUTTUR.EMPLOYEE_TRG BEFORE INSERT ON HPUTTUR.EMPLOYEE REFERENCING NEW AS New OLD AS Old FOR EACH ROW BEGIN — For Toad: Highlight column EMPLOYEE_ID :new.EMPLOYEE_ID := EMPLOYEE_SEQ.NEXTVAL; END EMPLOYEE_TRG; / ALTER TABLE HPUTTUR.EMPLOYEE ADD ( CONSTRAINT EMPLOYEE_PK PRIMARY KEY (EMPLOYEE_ID) USING INDEX HPUTTUR.EMPLOYEE_PK ENABLE VALIDATE); Insert into HPUTTUR.EMPLOYEE (EMPLOYEE_ID, EMPLOYEE_NAME, EMPLOYEE_MOBILE, EMPLOYEE_DEPARTMENT) Values (1, ‘Haneef Puttur’, ‘354354354345’, ‘Computer’); Insert into HPUTTUR.EMPLOYEE (EMPLOYEE_ID, EMPLOYEE_NAME, EMPLOYEE_MOBILE, EMPLOYEE_DEPARTMENT) Values (2, ‘Minnu’, ‘y676756565’, ‘Computer’); Insert into HPUTTUR.EMPLOYEE (EMPLOYEE_ID, EMPLOYEE_NAME, EMPLOYEE_MOBILE, EMPLOYEE_DEPARTMENT) Values (3, ‘Minaal Haneef’, […]

» Read more

Step by Step Instruction – Integrate TinyMCE with Uploadify using ASP.Net MVC C#

Earlier I was posted an article on Integrating Summernote on MVC ASP.Net . I received couple of feedback’s where users were facing issue with large content as the entire data including image will be send to the database and there will be with size of images. As we aware that there is TinyMCE editor which lacks in the area of Image Uploading. Image upload is not realistic in TinyMCE, however apart from that it has all the rich text editing features.  On the other hand Uploadify is a really simple file uploading jquery plugin which helps us in on the fly uploading of the files.   In this project I have merged the functionality of the above two and integrated with MVC ASP.NET C# for easy implementation in any of the project. Features: Rich Text Editing Features of TinyMCE ( You can enhance the features referring to this documentation ) Easy Image upload feature with restriction on file extension as well on file sizes. Seamlessly integrated Uploadify with TinyMCE , even works well with Multiple Files. Uploaded images are stored in the server and only reference is added to text editor hence making the content data small as possible. Complete […]

» Read more

WYSIWYG For Bootstrap ASP.Net MVC with Image Upload Feature

One of the common issue face is adding rich text editor with image upload option in bootstrap project which uses MVC , C# ASP.net I have spent a lot of time to customize TinyMCE editor, however I could not succeed completely. I have found summernote a very lite weight editor for Bootstrap. Step 1 : Create a default MVC ASP.NET project in Visual Studio 2013 Step 2 : Download summernote from http://summernote.org/ Step 3 : Copy the downloaded folder content to Scripts folder as shown Step 4 : Edit View –> Shared -> Layout.cshtml Move jquery bundle to top of the page Step 5: Create a Model , name as News.cs   using System.Web.Mvc; namespace WYSWYG.Models { public class News { public string Title { get; set; } [AllowHtml] public string Content { get; set; } } } Step6 Create a Controller NewsController.cs using System.Web.Mvc; using WYSWYG.Models; namespace WYSWYG.Controllers { public class NewsController : Controller { public ActionResult Index() { News newscontent = new News(); return View(); } [HttpPost] public ActionResult Index(News model) { return View(“NewsDisplay”, model); } } } Step 7 : Create a View and Name it as Index.cshtml under The View Folder News @model WYSWYG.Models.News @{ ViewBag.Title = […]

» Read more

Integrate Croppic to ASP.NET MVC C# – For Cropping Passport Size Picture 3.5cm X 4.5 Cm

Solution : Integrate Croppic to ASP.NET MVC C# , so that user can upload an image and crop, zoom , rotate the image and save to the assigned folder. Step 1: Create one empty Project ASP.NET Web Application in Visual Studio 2013 Step 2 : Download croppic (Image cropping jquery plugin from croppic.net == > Link  http://croppic.net/croppic.zip Please note that I have edited the css files to match the folder structure. Please download the entire solution from github and follow it. Step 3 : Extract The croppic Folder inside the scripts folder and make sure the folder structure as shown Step 4: Create a controller called Croppic and paste following content. using Newtonsoft.Json; using System; using System.Drawing; using System.Drawing.Drawing2D; using System.IO; using System.Web; using System.Web.Mvc; //Coding by Haneef puttur namespace Croppic.Controllers { public class CroppicController : Controller { public ActionResult Index() { return View(); } [HttpPost] public string UploadOriginalImage(HttpPostedFileBase img) { string folder = Server.MapPath(“~/Temp”); string extension = Path.GetExtension(img.FileName); string pic = System.IO.Path.GetFileName(Guid.NewGuid().ToString()); var tempPath = Path.ChangeExtension(pic, extension); string tempFilePath = System.IO.Path.Combine(folder, tempPath); img.SaveAs(tempFilePath); var image = System.Drawing.Image.FromFile(tempFilePath); var result = new { status = “success”, width = image.Width, height = image.Height, url = “../Temp/” + tempPath }; return JsonConvert.SerializeObject(result); […]

» Read more
1 2