Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [OperationContract]
- [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, UriTemplate = "InsertDetail/")]
- bool InsertDetail(string jsonString);
- <?xml version="1.0"?>
- <configuration>
- <configSections>
- <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true"/>
- </configSections>
- <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
- <listeners>
- <add name="Event Log Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" source="Enterprise Library Logging" formatter="Text Formatter" log="" machineName="." traceOutputOptions="None"/>
- <add name="Email Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.EmailTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.EmailTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" toAddress="thejus@thejus.com" fromAddress="thejus.tv@thejus.com" subjectLineStarter="ERP Service Log" subjectLineEnder="Error" smtpServer="smtp.thejus.com" smtpPort="587" formatter="Text Formatter" authenticationMode="UserNameAndPassword" userName="thejus.tv@thejus.com" password="" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack" asynchronous="true"/>
- <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName="G:ERP Log.log" footer="-------------Starting---------------------------" formatter="Text Formatter" header="-------------Ending---------------------------" rollInterval="Week" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack"/>
- </listeners>
- <formatters>
- <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" template="Timestamp: {timestamp}{newline}
Message: {message}{newline}
Category: {category}{newline}
Priority: {priority}{newline}
EventId: {eventid}{newline}
Severity: {severity}{newline}
Title:{title}{newline}
Machine: {localMachine}{newline}
App Domain: {localAppDomain}{newline}
ProcessId: {localProcessId}{newline}
Process Name: {localProcessName}{newline}
Thread Name: {threadName}{newline}
Win32 ThreadId:{win32ThreadId}{newline}
Extended Properties: {dictionary({key} - {value}{newline})}" name="Text Formatter"/>
- </formatters>
- <categorySources>
- <add switchValue="All" name="General">
- <listeners>
- <add name="Rolling Flat File Trace Listener"/>
- <add name="Email Trace Listener"/>
- </listeners>
- </add>
- </categorySources>
- <specialSources>
- <allEvents switchValue="All" name="All Events"/>
- <notProcessed switchValue="All" name="Unprocessed Category"/>
- <errors switchValue="All" name="Logging Errors & Warnings">
- <listeners>
- <add name="Event Log Listener"/>
- </listeners>
- </errors>
- </specialSources>
- </loggingConfiguration>
- <connectionStrings>
- <add name="DefaultConnection" connectionString="SQL|Data Source=DESKTOP;Initial Catalog=erp; User=sa; Password=;" providerName="System.Data.SqlClient"/>
- </connectionStrings>
- <appSettings>
- <add key="DefaultConnection" value="SQL|Data Source=DESKTOP;Initial Catalog=erp; User=sa; Password=;"/>
- <add key="CommandTimeOut" value="20"/>
- <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true"/>
- </appSettings>
- <system.web>
- <httpRuntime maxUrlLength="5000"/>
- <compilation targetFramework="4.0" debug="true"/>
- <customErrors mode="Off"/>
- </system.web>
- <system.serviceModel>
- <services>
- <service behaviorConfiguration="ServiceBehave" name="ERP.Hosting.RestService">
- <endpoint behaviorConfiguration="webHttpBehave" binding="webHttpBinding" bindingConfiguration="" contract="ERP.Hosting.IRestService"/>
- <host>
- <baseAddresses>
- <add baseAddress="http://localhost/grc"/>
- </baseAddresses>
- </host>
- </service>
- </services>
- <behaviors>
- <endpointBehaviors>
- <behavior name="webHttpBehave">
- <webHttp/>
- </behavior>
- </endpointBehaviors>
- <serviceBehaviors>
- <behavior name="">
- <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
- <serviceDebug includeExceptionDetailInFaults="false"/>
- </behavior>
- <behavior name="ServiceBehave">
- <serviceDebug/>
- <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
- </behavior>
- </serviceBehaviors>
- </behaviors>
- <serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
- </system.serviceModel>
- <system.webServer>
- <modules runAllManagedModulesForAllRequests="true"/>
- </system.webServer>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Practices.Unity" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-2.0.414.0" newVersion="2.0.414.0"/>
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
- <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- </configuration>
- $.ajax({
- type: "POST",
- url: url,
- data: JSON.stringify(jsonString),
- datatype: "json",
- contentType: "application/json",
- success: function (data) {
- alert('success');
- },
- erro: function (xhr, ajaxOptions, thrownError) {
- debugger;
- alert(thrownError);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement