Skip to main content

Posts

Showing posts from August, 2012

Memcached Caching

Tools MemCacheD Manager v1.0.3.0 as Memcached Server Enyim Memcached Client as Memcached .Net Client Library (Add these references to your project: Enyim.Caching.dll, log4net.dll, MemcachedProviders.dll) Your Client Program   MemCacheD Manager Run the setup file and configure a Memcached Server as shown below: Client Program Create a new .Net project and add these settings to web.config file as shown below: < configSections >              < section name = " cacheProvider " type = " MemcachedProviders.Cache.CacheProviderSection,   MemcachedProviders " allowDefinition = " MachineToApplication " restartOnExternalChanges = " true " />              < sectionGroup name = " enyim.com " >                     < section name = " memcached " type = " Enyim.Caching.Configuration.MemcachedClientSection, Enyim.Caching " />              </ sectionGroup >             

Data Caching

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WACashingTester._Default" %> <!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> </head> <body>     <form id="form1" runat="server">     <div>         <asp:Label ID="Label1" runat="server" Text=""></asp:Label>         <br />         <asp:GridView ID="GridView1" runat="server">         </asp:GridView>         <asp:ScriptManager ID="ScriptManager1" runat="server">         </asp:ScriptManager>         <asp:Timer ID="Timer1" runat="server" Interv

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"

If there isn't any problem on the code side, then the reason can be about authentication and privileges settings. You need to adjust them as well. Here is the solution: You can reach my sample program from this link: http://www.nurhak-kaya.blogspot.com/2012/08/process-worker-web-service-exe-starter.html Run the Internet Information Services (IIS) Manager service Go to Application Pools Select the user DefaultAppPool and from Advanced Settings on the right side of the menu, change the Identity column as LocalSystem. This default user can be different in your working environment but for most of the developers this is going to be the user. Right click on DefaultWebSite (or here can be different according to your project name), choose Add Application and after setting the allias and path, click on Connect As button. Choose Specific user option and then Set the credentials for your application. This user must have rights to run this service on IIS. For your

Creating relations between tables in Oracle

create table CATEGORIES (   CATEGORYID number primary key,   CATEGORYNAME varchar2(50),   CATEGORYDESCRIPTION varchar2(50) ); create table PRODUCTS (   PRODUCTID number primary key,   PRODUCTNAME varchar2(50),   PRODUCTDESCRIPTION varchar2(250),   CATEGORYID number CONSTRAINT PRODUCTCATEGORYID   REFERENCES CATEGORIES(CATEGORYID) );

How to Create a Function in Oracle

CREATE OR REPLACE FUNCTION TESTBYNAME2(XKENTLI_AD VARCHAR2)  RETURN VARCHAR2 IS     XBABAADI VARCHAR2(50); BEGIN     SELECT BABA_ADI INTO XBABAADI FROM ORT_KENTLI WHERE ADI=XKENTLI_AD AND ROWNUM=1;       IF xbabaadi='MEHMET' THEN         XBABAADI:='KASIM';       END IF; RETURN XBABAADI; END;

Process Worker Web Service (.exe Starter)

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.IO; using System.Diagnostics; using System.Security.Principal; using System.Security; using System.Runtime.InteropServices; namespace ProWS {     /// <summary>     /// Summary description for Service1     /// </summary>     [WebService(Namespace = "http://tempuri.org/")]     [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]     [System.ComponentModel.ToolboxItem(false)]     // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.     // [System.Web.Script.Services.ScriptService]     public class Pro: System.Web.Services.WebService     {         [WebMethod]         public bool ProWorker(string filePath)         {             string htm = ".htm";             string iFileName = Path.GetFileName(filePath);             string oFileName = iFileName

How to Create Auto-Increment Field in Oracle

Create a sample table. CREATE  TABLE SAMPLETABLE (   TABLEID  number,   TABLEDATA  varchar2(20) ); Create a new sequence. CREATE SEQUENCE SEQ_SAMPLETABLE_ID START WITH 1 INCREMENT BY 1 ; Create a new trigger. CREATE OR REPLACE TRIGGER TRIGGER_SAMPLETABLE  BEFORE INSERT ON SAMPLETABLE  FOR EACH ROW BEGIN   SELECT SEQ_SAMPLETABLE_ID.NEXTVAL INTO :NEW.TABLEID FROM dual; END;