diff --git a/DataUploader/FullSync.aspx.cs b/DataUploader/FullSync.aspx.cs index e8a8798..49e0228 100644 --- a/DataUploader/FullSync.aspx.cs +++ b/DataUploader/FullSync.aspx.cs @@ -17,6 +17,11 @@ namespace DataUploader protected void Page_Load(object sender, EventArgs e) { DateTime tick = DateTime.Now; + var client = new WebClient(); + client.Headers[HttpRequestHeader.Accept] = "text/html, image/png, image/jpeg, image/gif, */*;q=0.1"; + client.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"; + client.Proxy = null; + ServicePointManager.DefaultConnectionLimit = int.MaxValue; // verifico se vado in modalità demo o meno... bool demoMode = false; try @@ -29,10 +34,10 @@ namespace DataUploader int lastNum = 0; try { - var client = new WebClient(); var content = client.DownloadString(ConfigurationManager.AppSettings["remoteDocUrl"]); // http://webscr.steamware.net/Rigamonti/Upload/Document // converto a int! lastNum = Convert.ToInt32(content); + logger.Info("Recuperato last num: {0}", lastNum); } catch { } @@ -45,17 +50,26 @@ namespace DataUploader { lblOut.Text += string.Format("
{0:000}) {1}", i + 1, urlsUpdate[i]); } - logger.Info("Effettuato DEMO upload FULL SYNC: durata {0} msec", DateTime.Now.Subtract(tick).TotalMilliseconds); + logger.Info("Effettuato DEMO upload FULL SYNC: durata {0} msec", DateTime.Now.Subtract(tick).TotalMilliseconds); } else { + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Inizio chiamate URL"); + } lblOut.Text = string.Format("Normal MODE!
{0}", lastNum); - var client = new WebClient(); + string content = ""; for (int i = 0; i < urlsUpdate.Length; i++) { try { - var content = client.DownloadString(urlsUpdate[i]); + // versione SYNC + content = client.DownloadString(urlsUpdate[i]); + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Chiamata, esito {0}{1}{2}, esito {1}", content, Environment.NewLine, urlsUpdate[i]); + } } catch { } @@ -70,5 +84,17 @@ namespace DataUploader } } } + /// + /// ricezione risposta URL... + /// + /// + /// + protected void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) + { + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Chiamata, esito {0}", e.Result); + } + } } } \ No newline at end of file diff --git a/DataUploader/GestData.cs b/DataUploader/GestData.cs index 0506513..c13bff0 100644 --- a/DataUploader/GestData.cs +++ b/DataUploader/GestData.cs @@ -45,6 +45,10 @@ namespace DataUploader public string[] getNewDocsUrls(int numeroFrom) { + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Inizio getNewDocsUrls"); + } // ipotesi: si caricano maxDocsToUpload documenti alal volta (e quindi altrettanti clienti) int maxDocsToUpload = Convert.ToInt32(ConfigurationManager.AppSettings["maxDocsToUpload"]); @@ -54,7 +58,7 @@ namespace DataUploader string comandoDoc; // qui va fatto ciclo x spazzare 1 ad 1 i docuemnti ed i relativi clienti - if (!Convert.ToBoolean(ConfigurationManager.AppSettings["queryFormatDB2"])) + if (false) { // query in formato ACCESS 2010 comandoDoc = string.Format(@"SELECT TOP {0} TESDOCUM.TIPOPROTOC, TESDOCUM.NUMERO, TESDOCUM.ESERPROTOC, @@ -93,6 +97,10 @@ namespace DataUploader try { conn.Open(); + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Aperta connessione ODBC"); + } // dati documento int num = 0; @@ -114,6 +122,11 @@ namespace DataUploader } } + //if (ConfigurationManager.AppSettings["debugMode"] == "true") + //{ + // logger.Info("Completata lettura ODBC x DOC"); + //} + // il campo 12 è il cod cliente! rCli[0] = rDoc[12]; @@ -152,6 +165,12 @@ namespace DataUploader } } } + + //if (ConfigurationManager.AppSettings["debugMode"] == "true") + //{ + // logger.Info("Completata lettura ODBC x CLI"); + //} + // formatto answ... prima CLI poi DOCS... answ[num++] = createUrlCli(rCli); answ[num++] = createUrlDoc(rDoc); @@ -174,6 +193,11 @@ namespace DataUploader conn.Close(); } + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Chiusura connessione ODBC"); + } + // end ciclo, resituisco tutti i records return answ; } diff --git a/DataUploader/Properties/PublishProfiles/Zip.pubxml b/DataUploader/Properties/PublishProfiles/Zip.pubxml index dbd4ce3..fd19a44 100644 --- a/DataUploader/Properties/PublishProfiles/Zip.pubxml +++ b/DataUploader/Properties/PublishProfiles/Zip.pubxml @@ -5,14 +5,13 @@ by editing this MSBuild file. In order to learn more about this please visit htt --> - Package + FileSystem Release Any CPU True False - C:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\ReleaseClienti\DataUploader.zip - true - Default Web Site/DataUploader + C:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\ReleaseClienti\DataUploader + False \ No newline at end of file diff --git a/DataUploader/Properties/PublishProfiles/Zip.pubxml.user b/DataUploader/Properties/PublishProfiles/Zip.pubxml.user index 5d231f3..c90e42b 100644 --- a/DataUploader/Properties/PublishProfiles/Zip.pubxml.user +++ b/DataUploader/Properties/PublishProfiles/Zip.pubxml.user @@ -6,11 +6,11 @@ by editing this MSBuild file. In order to learn more about this please visit htt - <_PublishTargetUrl>C:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\ReleaseClienti + <_PublishTargetUrl>C:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\ReleaseClienti\DataUploader - 06/15/2015 12:08:18 + 06/15/2015 19:50:01 06/15/2015 12:03:55 @@ -46,7 +46,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt 06/15/2015 12:00:13 - 06/15/2015 12:08:18 + 06/15/2015 19:31:11 \ No newline at end of file diff --git a/DataUploader/SyncDoc.aspx.cs b/DataUploader/SyncDoc.aspx.cs index 38a00a3..929cfc6 100644 --- a/DataUploader/SyncDoc.aspx.cs +++ b/DataUploader/SyncDoc.aspx.cs @@ -48,11 +48,17 @@ namespace DataUploader { lblOut.Text = string.Format("Dati caricati!
DOC: {0}/{1}", DOC, Anno); var client = new WebClient(); + client.Headers[HttpRequestHeader.Accept] = "text/html, image/png, image/jpeg, image/gif, */*;q=0.1"; + client.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12"; for (int i = 0; i < urlsUpdate.Length; i++) { try { var content = client.DownloadString(urlsUpdate[i]); + if (ConfigurationManager.AppSettings["debugMode"] == "true") + { + logger.Info("Chiamata, esito {0}{1}{2}{1}", content, Environment.NewLine, urlsUpdate[i]); + } } catch { } diff --git a/DataUploader/Web.config b/DataUploader/Web.config index e980579..0ac228c 100644 --- a/DataUploader/Web.config +++ b/DataUploader/Web.config @@ -2,10 +2,10 @@ - + - + diff --git a/DataUploader/bin/DataUploader.dll b/DataUploader/bin/DataUploader.dll index 3ea4475..170c96b 100644 Binary files a/DataUploader/bin/DataUploader.dll and b/DataUploader/bin/DataUploader.dll differ diff --git a/DataUploader/logs/2015-06-15.log b/DataUploader/logs/2015-06-15.log index e69de29..87505e6 100644 --- a/DataUploader/logs/2015-06-15.log +++ b/DataUploader/logs/2015-06-15.log @@ -0,0 +1,45 @@ +2015-06-15 13:35:16.3256 [ERROR] Eccezione +System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. + in System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) + in System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) + in System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions) + in System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) + in System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + in System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) + in System.Data.Odbc.OdbcConnection.Open() + in DataUploader.GestData.getDocsUrls(String CodDoc, String Anno) in c:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\DataUploader\GestData.cs:riga 196 +2015-06-15 13:35:16.3406 [INFO] Effettuato DEMO upload singolo documento: durata 98,0086 msec +2015-06-15 15:44:25.8976 [ERROR] Eccezione +System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. + in System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) + in System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) + in System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions) + in System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) + in System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + in System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) + in System.Data.Odbc.OdbcConnection.Open() + in DataUploader.GestData.getDocsUrls(String CodDoc, String Anno) in c:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\DataUploader\GestData.cs:riga 220 +2015-06-15 15:44:25.9126 [INFO] Effettuato DEMO upload singolo documento: durata 100,0064 msec +2015-06-15 16:20:55.5255 [ERROR] Eccezione +System.Data.Odbc.OdbcException (0x80131937): ERROR [IM002] [Microsoft][Driver Manager ODBC] Nome origine dati non trovato e driver predefinito non specificato. + in System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode) + in System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle) + in System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions) + in System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) + in System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) + in System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) + in System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) + in System.Data.Odbc.OdbcConnection.Open() + in DataUploader.GestData.getDocsUrls(String CodDoc, String Anno) in c:\Users\samuele\Documents\Visual Studio 2012\Projects\WebSCR\DataUploader\GestData.cs:riga 220 +2015-06-15 16:20:55.5405 [INFO] Effettuato DEMO upload singolo documento: durata 115,0185 msec diff --git a/ReleaseClienti/DataUploader.SetParameters.xml b/ReleaseClienti/DataUploader.SetParameters.xml deleted file mode 100644 index 528dad5..0000000 --- a/ReleaseClienti/DataUploader.SetParameters.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/ReleaseClienti/DataUploader.SourceManifest.xml b/ReleaseClienti/DataUploader.SourceManifest.xml deleted file mode 100644 index 6d53a6e..0000000 --- a/ReleaseClienti/DataUploader.SourceManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/ReleaseClienti/DataUploader.deploy-readme.txt b/ReleaseClienti/DataUploader.deploy-readme.txt deleted file mode 100644 index 0e71def..0000000 --- a/ReleaseClienti/DataUploader.deploy-readme.txt +++ /dev/null @@ -1,63 +0,0 @@ - -=========================== -Prerequisites : --------------------------- -To deploy this Web package, Web Deploy (msdeploy.exe) must be installed on the computer that runs the .cmd file. For information about how to install Web Deploy, see the following URL: -http://go.microsoft.com/?linkid=9278654 -This batch file requires that the package file "DataUploader.zip" and optionally provided the parameters file "DataUploader.SetParameters.xml" in the same folder or destination folder by environment variable. - -=========================== -Usage: --------------------------- -DataUploader.deploy.cmd [/T|/Y] [/M:ComputerName] [/U:UserName] [/P:Password] [/G:UseTempAgent] [Additional msdeploy.exe flags ...] - - -=========================== -Required Flags: --------------------------- -/T: - Calls msdeploy.exe with the "-whatif" flag, which simulates deployment. This does not deploy the package. Instead, it creates a report of what will happen when you actually deploy the package. -/Y: - Calls msdeploy.exe without the "-whatif" flag, which deploys the package to the current machine or a destination server. Use /Y after you have verified the output that was generated by using the /T flag. - -Note: Do not use /T and /Y in the same command. - -=========================== -Optional Flags: --------------------------- - By Default, this script deploy on the current machine where this script is called with current user credential without agent service. Only pass the following value for advance scenario. - -/M: - If this flag is not specified, the package is installed on the computer where the command is run. The Service URL can be in the following format: - https://:8172/MSDeploy.axd - This format requires that IIS 7 be installed on the destination server and that IIS 7 Web Management Service(WMSvc) and Web Deployment Handler be set up. - The service URL can also be in the following format: - http:///MSDeployAgentService - This format requires administrative rights on the destination server, and it requires that Web Deploy Remote Service (MsDepSvc) be installed on the destination server. IIS 7 does not have to be installed on the destination server. - -/U: -/P: -/G: - Specifies that the package is deployed by creating a temporary listener on the destination server. This requires no special installation on the destination server, but it requires you to be an administrator on that server. The default value of this flag is False. - -/A: - Specifies the type of authentication to be used. The possible values are NTLM and Basic. If the wmsvc provider setting is specified, the default authentication type is Basic; otherwise, the default authentication type is NTLM. - -/L - Specifies that the package is deployed to local IISExpress user instance. - -[Additional msdeploy.exe flags] - The msdeploy.exe command supports additional flags. You can include any of these additional flags in the "$(ProjectName).Deploy.cmd" file, and the flags are passed through to msdeploy.exe during execution. - Alternatively, you can specify additional flags by setting the "_MsDeployAdditionalFlags" environment variable. These settings are used by this batch file. - Note: Any flag value that includes an equal sign (=) must be enclosed in double quotation marks, as shown in the following example, which will skip deploying the databases that are included in the package: - "-skip:objectName=dbFullSql" - -=========================== -Environment-Specific Settings: --------------------------- - - To customize application-specific settings for each deployment environment (for example, the IIS application name, the physical path, and any connection strings), edit the settings in the following file: - "DataUploader.SetParameters.xml" -=========================== -For more information on this deploy script visit: http://go.microsoft.com/fwlink/?LinkID=183544 - diff --git a/ReleaseClienti/DataUploader.deploy.cmd b/ReleaseClienti/DataUploader.deploy.cmd deleted file mode 100644 index e701476..0000000 --- a/ReleaseClienti/DataUploader.deploy.cmd +++ /dev/null @@ -1,311 +0,0 @@ -@rem --------------------------------------------------------------------------------- -@rem Copyright 2008 Microsoft Corporation. All rights reserved. -@rem This is provided as sample to deploy the package using msdeploy.exe -@rem For information about IIS Web Deploy technology, -@rem please visit http://go.microsoft.com/?linkid=9278654 -@rem Note: This batch file assumes the package and setparametsrs.xml are in the same folder with this file -@rem --------------------------------------------------------------------------------- -@if %_echo%!==! echo off -setlocal -@rem --------------------------------------------------------------------------------- -@rem Please Make sure you have Web Deploy install in your machine. -@rem Alternatively, you can explicit set the MsDeployPath to the location it is on your machine -@rem set MSDeployPath="C:\Program Files (x86)\IIS\Microsoft Web Deploy V3\" -@rem --------------------------------------------------------------------------------- - -@rem --------------------------------------------------------------------------------- -@rem if user does not set MsDeployPath environment variable, we will try to retrieve it from registry. -@rem --------------------------------------------------------------------------------- -if "%MSDeployPath%" == "" ( -for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /s ^| findstr -i "InstallPath"`) do ( -if /I "%%h" == "InstallPath" ( -if /I "%%i" == "REG_SZ" ( -if not "%%j" == "" ( -if "%%~dpj" == "%%j" ( -set MSDeployPath=%%j -)))))) - -@rem ------------------------------------------ - -@rem ------------------------------------------ - - -if not exist "%MSDeployPath%msdeploy.exe" ( -echo. msdeploy.exe is not found on this machine. Please install Web Deploy before execute the script. -echo. Please visit http://go.microsoft.com/?linkid=9278654 -goto :usage -) - -set RootPath=%~dp0 -if /I "%_DeploySetParametersFile%" == "" ( -set _DeploySetParametersFile=%RootPath%DataUploader.SetParameters.xml -) - -@rem ------------------------------------------ - -@rem ------------------------------------------ - - -set _ArgTestDeploy= -set _ArgDestinationType=auto -set _ArgComputerNameWithQuote="" -set _ArgUserNameWithQuote="" -set _ArgPasswordWithQuote="" -set _ArgEncryptPasswordWithQuote="" -set _ArgIncludeAclsWithQuote="False" -set _ArgAuthTypeWithQuote="" -set _ArgtempAgentWithQuote="" -set _ArgLocalIIS= -set _ArgLocalIISVersion= -set _HaveArgMSDeployAdditonalFlags= - - -@rem --------------------------------------------------------------------------------- -@rem Simple Parse the arguments -@rem --------------------------------------------------------------------------------- -:NextArgument -set _ArgCurrent=%~1 -set _ArgFlagFirst=%_ArgCurrent:~0,1% -set _ArgFlag=%_ArgCurrent:~0,3% -set _ArgValue=%_ArgCurrent:~3% - -if /I "%_ArgFlag%" == "" goto :GetStarted -if /I "%_ArgFlag%" == "~0,3" goto :GetStarted -if /I "%_ArgFlag%" == "/T" set _ArgTestDeploy=true&goto :ArgumentOK -if /I "%_ArgFlag%" == "/Y" set _ArgTestDeploy=false&goto :ArgumentOK -if /I "%_ArgFlag%" == "/L" set _ArgLocalIIS=true&goto :ArgumentOK - -if /I "%_ArgFlag%" == "/M:" set _ArgComputerNameWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/U:" set _ArgUserNameWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/P:" set _ArgPasswordWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/E:" set _ArgEncryptPasswordWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/I:" set _ArgIncludeAclsWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/A:" set _ArgAuthTypeWithQuote="%_ArgValue%"&goto :ArgumentOK -if /I "%_ArgFlag%" == "/G:" set _ArgtempAgentWithQuote="%_ArgValue%"&goto :ArgumentOK - -@rem Any addition flags, pass through to the msdeploy -if "%_HaveArgMSDeployAdditonalFlags%" == "" ( -goto :Assign_ArgMsDeployAdditionalFlags -) -set _ArgMsDeployAdditionalFlags=%_ArgMsDeployAdditionalFlags:&=^&% %_ArgCurrent:&=^&% -set _HaveArgMSDeployAdditonalFlags=1 -goto :ArgumentOK - - -:Assign_ArgMsDeployAdditionalFlags -set _ArgMsDeployAdditionalFlags=%_ArgCurrent:&=^&% -set _HaveArgMSDeployAdditonalFlags=1 -goto :ArgumentOK - -:ArgumentOK -shift -goto :NextArgument - -:GetStarted -@rem ------------------------------------------ - -@rem ------------------------------------------ -if /I "%_ArgTestDeploy%" == "" goto :usage -if /I "%_ArgDestinationType%" == "" goto :usage - -set _Destination=%_ArgDestinationType% -if not %_ArgComputerNameWithQuote% == "" set _Destination=%_Destination%,computerName=%_ArgComputerNameWithQuote% -if not %_ArgUserNameWithQuote% == "" set _Destination=%_Destination%,userName=%_ArgUserNameWithQuote% -if not %_ArgPasswordWithQuote% == "" set _Destination=%_Destination%,password=%_ArgPasswordWithQuote% -if not %_ArgAuthTypeWithQuote% == "" set _Destination=%_Destination%,authtype=%_ArgAuthTypeWithQuote% -if not %_ArgEncryptPasswordWithQuote% == "" set _Destination=%_Destination%,encryptPassword=%_ArgEncryptPasswordWithQuote% -if not %_ArgIncludeAclsWithQuote% == "" set _Destination=%_Destination%,includeAcls=%_ArgIncludeAclsWithQuote% -if not %_ArgtempAgentWithQuote% == "" set _Destination=%_Destination%,tempAgent=%_ArgtempAgentWithQuote% - -@rem ------------------------------------------ - -@rem ------------------------------------------ - - -@rem --------------------------------------------------------------------------------- -@rem add -whatif when -T is specified -@rem --------------------------------------------------------------------------------- -if /I "%_ArgTestDeploy%" NEQ "false" ( -set _MsDeployAdditionalFlags=-whatif %_MsDeployAdditionalFlags% -) - -@rem ------------------------------------------ - -@rem ------------------------------------------ - -@rem --------------------------------------------------------------------------------- -@rem add flags for IISExpress when -L is specified -@rem --------------------------------------------------------------------------------- - -if /I "%_ArgLocalIIS%" == "true" ( -call :SetIISExpressArguments -) -if /I "%_ArgLocalIIS%" == "true" ( -if not exist "%IISExpressPath%%IISExpressManifest%" ( -echo. IISExpress is not found on this machine. Please install through Web Platform Installer before execute the script. -echo. or remove /L flag -echo. Please visit http://go.microsoft.com/?linkid=9278654 -goto :usage -) -if not exist "%IISExpressUserProfileDirectory%" ( -echo. %IISExpressUserProfileDirectory% is not exists -echo. IISExpress is found on the machine. But the user have run IISExpress at least once. -echo. Please visit http://go.microsoft.com/?linkid=9278654 for detail -goto :usage -) - -set _MsDeployAdditionalFlags=%_MsDeployAdditionalFlags% -appHostConfigDir:%IISExpressUserProfileDirectory% -WebServerDir:"%IISExpressPath%" -webServerManifest:"%IISExpressManifest%" -) - -@rem --------------------------------------------------------------------------------- -@rem check the existence of the package file -@rem --------------------------------------------------------------------------------- -if not exist "%RootPath%DataUploader.zip" ( -echo "%RootPath%DataUploader.zip" does not exist. -echo This batch file relies on this deploy source file^(s^) in the same folder. -goto :usage -) - -@rem --------------------------------------------- - -@rem --------------------------------------------- - -@rem --------------------------------------------------------------------------------- -@rem Execute msdeploy.exe command line -@rem --------------------------------------------------------------------------------- -call :CheckParameterFile -echo. Start executing msdeploy.exe -echo ------------------------------------------------------- -if not exist "%_DeploySetParametersFile%" ( -set _MSDeployCommandline="%MSDeployPath%msdeploy.exe" -source:package='%RootPath%DataUploader.zip' -dest:%_Destination% -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -) else ( -set _MSDeployCommandline="%MSDeployPath%msdeploy.exe" -source:package='%RootPath%DataUploader.zip' -dest:%_Destination% -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"%_DeploySetParametersFile%" -) - -if "%_HaveArgMSDeployAdditonalFlags%" == "" ( -goto :MSDeployWithOutArgMsDeployAdditionalFlag -) -goto :MSDeployWithArgMsDeployAdditionalFlag -goto :eof - -@rem --------------------------------------------------------------------------------- -@rem MSDeployWithArgMsDeployAdditionalFlag -@rem --------------------------------------------------------------------------------- -:MSDeployWithArgMsDeployAdditionalFlag -echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&=^&% -%_MSDeployCommandline% %_MsDeployAdditionalFlags% %_ArgMsDeployAdditionalFlags:&=^&% -goto :eof - -@rem --------------------------------------------------------------------------------- -@rem MSDeployWithOutArgMsDeployAdditionalFlag -@rem --------------------------------------------------------------------------------- -:MSDeployWithOutArgMsDeployAdditionalFlag -echo. %_MSDeployCommandline% %_MsDeployAdditionalFlags% -%_MSDeployCommandline% %_MsDeployAdditionalFlags% -goto :eof - -@rem --------------------------------------------------------------------------------- -@rem Find and set IISExpress argument. -@rem --------------------------------------------------------------------------------- -:SetIISExpressArguments - -if "%IISExpressPath%" == "" ( -for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IISExpress" /s ^| findstr -i "InstallPath"`) do ( -if /I "%%h" == "InstallPath" ( -if /I "%%i" == "REG_SZ" ( -if not "%%j" == "" ( -if "%%~dpj" == "%%j" ( -set IISExpressPath=%%j -)))))) - -if "%IISExpressPath%" == "" ( -for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress" /s ^| findstr -i "InstallPath"`) do ( -if /I "%%h" == "InstallPath" ( -if /I "%%i" == "REG_SZ" ( -if not "%%j" == "" ( -if "%%~dpj" == "%%j" ( -set IISExpressPath=%%j -)))))) - -if "%PersonalDocumentFolder%" == "" ( -for /F "usebackq tokens=2*" %%i in (`reg query "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v Personal`) do ( -set PersonalDocumentFolder=%%j -)) - -if "%IISExpressManifest%" == "" ( -for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Microsoft\IISExpress" /s ^| findstr -i "Manifest"`) do ( -if /I "%%h" == "Manifest" ( -if /I "%%i" == "REG_SZ" ( -if not "%%j" == "" ( -set IISExpressManifest=%%j -))))) - -if "%IISExpressManifest%" == "" ( -for /F "usebackq tokens=1,2,*" %%h in (`reg query "HKLM\SOFTWARE\Wow6432Node\Microsoft\IISExpress" /s ^| findstr -i "Manifest"`) do ( -if /I "%%h" == "Manifest" ( -if /I "%%i" == "REG_SZ" ( -if not "%%j" == "" ( -set IISExpressManifest=%%j -))))) - -set IISExpressUserProfileDirectory="%PersonalDocumentFolder%\IISExpress\config" - -@rem --------------------------------------------- - -@rem --------------------------------------------- - -goto :eof - -@rem --------------------------------------------------------------------------------- -@rem CheckParameterFile -- check if the package's setparamters.xml exists or not -@rem --------------------------------------------------------------------------------- -:CheckParameterFile -if exist "%_DeploySetParametersFile%" ( -echo SetParameters from: -echo "%_DeploySetParametersFile%" -echo You can change IIS Application Name, Physical path, connectionString -echo or other deploy parameters in the above file. -) else ( -echo SetParamterFiles does not exist in package location. -echo Use package embedded defaultValue to deploy. -) -echo ------------------------------------------------------- -goto :eof - -@rem --------------------------------------------------------------------------------- -@rem Usage -@rem --------------------------------------------------------------------------------- -:usage -echo ========================================================= -if not exist "%RootPath%DataUploader.deploy-readme.txt" ( -echo Usage:%~nx0 [/T^|/Y] [/M:ComputerName] [/U:userName] [/P:password] [/G:tempAgent] [additional msdeploy flags ...] -echo Required flags: -echo /T Calls msdeploy.exe with the "-whatif" flag, which simulates deployment. -echo /Y Calls msdeploy.exe without the "-whatif" flag, which deploys the package to the current machine or destination server -echo Optional flags: -echo. By Default, this script deploy to the current machine where this script is invoked which will use current user credential without tempAgent. -echo. Only pass these arguments when in advance scenario. -echo /M: Msdeploy destination name of remote computer or proxy-URL. Default is local. -echo /U: Msdeploy destination user name. -echo /P: Msdeploy destination password. -echo /G: Msdeploy destination tempAgent. True or False. Default is false. -echo /A: specifies the type of authentication to be used. The possible values are NTLM and Basic. If the wmsvc provider setting is specified, the default authentication type is Basic -otherwise, the default authentication type is NTLM. -echo /L: Deploy to Local IISExpress User Instance. - -echo.[additional msdeploy flags]: note: " is required for passing = through command line. -echo "-skip:objectName=setAcl" "-skip:objectName=dbFullSql" -echo.Alternative environment variable _MsDeployAdditionalFlags is also honored. -echo. -echo. Please make sure MSDeploy is installed in the box http://go.microsoft.com/?linkid=9278654 -echo. -echo In addition, you can change IIS Application Name, Physical path, -echo connectionString and other deploy parameters in the following file: -echo "%_DeploySetParametersFile%" -echo. -echo For more information about this batch file, visit http://go.microsoft.com/fwlink/?LinkID=183544 -) else ( -start notepad "%RootPath%DataUploader.deploy-readme.txt" -) -echo ========================================================= -goto :eof diff --git a/ReleaseClienti/DataUploader.zip b/ReleaseClienti/DataUploader.zip index 8bb15ec..7e2cd7f 100644 Binary files a/ReleaseClienti/DataUploader.zip and b/ReleaseClienti/DataUploader.zip differ diff --git a/ReleaseClienti/DataUploader/Default.aspx b/ReleaseClienti/DataUploader/Default.aspx new file mode 100644 index 0000000..29e71a7 --- /dev/null +++ b/ReleaseClienti/DataUploader/Default.aspx @@ -0,0 +1,30 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DataUploader.Default" %> + + + + + + + + +
+
+ Steamware +

WebSCR DataUploader

+ Pagina di riferimento per progetto upload dati da Sigla++ Trony Rigamonti a WebSCR@steamware +
+
+ <%--Per effettuare test utilizzare la Demo Page +
--%> + Per l'uso in produzione / continuativo vanno richiamate +
    +
  • periodicamente la pagina di FullSync
  • +
  • su richiesta utente la pagina di SyncDoc
  • +
+
+ @2015-<%: DateTime.Now.Year %> Steamware +
+
+
+ + diff --git a/ReleaseClienti/DataUploader/DemoPage.aspx b/ReleaseClienti/DataUploader/DemoPage.aspx new file mode 100644 index 0000000..a488194 --- /dev/null +++ b/ReleaseClienti/DataUploader/DemoPage.aspx @@ -0,0 +1,47 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DemoPage.aspx.cs" Inherits="DataUploader.DemoPage" %> + + + + + + + + +
+
+

DemoPage

+ In questa pagina è riassunt la logica di chiamata delle altre pagine ed il funzionamento. +
+
+
+

FullSync

+ Questa è la pagina da chiamare periodicamente (esecuzione automatica?) in modo da effettuare il sync periodico dei dati da sigla ad online. +
+ Il ciclo prevede i seguenti step: +
    +
  • Chiamata a sito remoto x avere codice dell'ultimo doc caricato (NUMERO univoco)
  • +
  • Chiamata a server DB2 locale x avere TUTTI i documenti "successivi"
  • +
  • Chiamata di invio dati per ogni documento non ancora caricato (e per ogni cliente per update)
  • +
+ il tutto viene fatto tramite la classe helper GestData +
+ Demo: FullSync.aspx +
+
+
+

SyncDoc

+ Questa è la pagina da chiamare SU RICHIESTA UTENTE in modo da effettuare il sync PUNTUALE dei dati da sigla ad online per uno specifico documento. +
+ Il ciclo prevede i seguenti step: +
    +
  • La pagina riceve un parametro del codice documento richiesto (TIPOPROTOC = OC/DC + NUMPROTOC incrementale annuale)
  • +
  • Chiamata a server DB2 locale x avere dati del documento
  • +
  • Chiamata di invio dati per documento e per il cliente correlato
  • +
+ il tutto viene fatto tramite la classe helper GestData +
+ Demo: SyncDoc.aspx?DOC=OC0001616&Anno=2015 +
+
+ + diff --git a/ReleaseClienti/DataUploader/FullSync.aspx b/ReleaseClienti/DataUploader/FullSync.aspx new file mode 100644 index 0000000..c8f0b2c --- /dev/null +++ b/ReleaseClienti/DataUploader/FullSync.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FullSync.aspx.cs" Inherits="DataUploader.FullSync" %> + + + + + + + + +
+
+

FullSync

+ Modalità chiamata: +
    +
  • Senza parametri: effettua tutte le chiamate remote
  • +
  • Con aggiunto il parametro "?DemoMode=true" nell'url --> NON viene chiamata (per ogni record) la pagina remota ma viene mostrato l'elenco delle chiamate che SI SAREBBERO EFFETTUATE
  • +
+
+

OUTPUT

+ +
+
+ + diff --git a/ReleaseClienti/DataUploader/SyncDoc.aspx b/ReleaseClienti/DataUploader/SyncDoc.aspx new file mode 100644 index 0000000..3675d7f --- /dev/null +++ b/ReleaseClienti/DataUploader/SyncDoc.aspx @@ -0,0 +1,24 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SyncDoc.aspx.cs" Inherits="DataUploader.SyncDoc" %> + + + + + + + + +
+
+

SyncDoc

+ <%--Modalità chiamata: è SEMPRE necessario nell'URL il numero del documento e l'anno! ?DOC=OC0001616&Anno=2015 +
    +
  • Senza parametri: effettua tutte le chiamate remote
  • +
  • Con aggiunto il parametro "?DemoMode=true" nell'url --> NON viene chiamata (per ogni record) la pagina remota ma viene mostrato l'elenco delle chiamate che SI SAREBBERO EFFETTUATE
  • +
+
+

OUTPUT

--%> + +
+
+ + diff --git a/ReleaseClienti/DataUploader/Web.config b/ReleaseClienti/DataUploader/Web.config new file mode 100644 index 0000000..9e0f8fe --- /dev/null +++ b/ReleaseClienti/DataUploader/Web.config @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ReleaseClienti/DataUploader/bin/DataUploader.dll b/ReleaseClienti/DataUploader/bin/DataUploader.dll new file mode 100644 index 0000000..170c96b Binary files /dev/null and b/ReleaseClienti/DataUploader/bin/DataUploader.dll differ diff --git a/ReleaseClienti/DataUploader/bin/NLog.Web.dll b/ReleaseClienti/DataUploader/bin/NLog.Web.dll new file mode 100644 index 0000000..70d8719 Binary files /dev/null and b/ReleaseClienti/DataUploader/bin/NLog.Web.dll differ diff --git a/ReleaseClienti/DataUploader/bin/NLog.config b/ReleaseClienti/DataUploader/bin/NLog.config new file mode 100644 index 0000000..ddf73fa --- /dev/null +++ b/ReleaseClienti/DataUploader/bin/NLog.config @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ReleaseClienti/DataUploader/bin/NLog.dll b/ReleaseClienti/DataUploader/bin/NLog.dll new file mode 100644 index 0000000..064bc61 Binary files /dev/null and b/ReleaseClienti/DataUploader/bin/NLog.dll differ diff --git a/ReleaseClienti/DataUploader/favicon.ico b/ReleaseClienti/DataUploader/favicon.ico new file mode 100644 index 0000000..70ccada Binary files /dev/null and b/ReleaseClienti/DataUploader/favicon.ico differ diff --git a/ReleaseClienti/DataUploader/images/LogoSteamware.png b/ReleaseClienti/DataUploader/images/LogoSteamware.png new file mode 100644 index 0000000..9098752 Binary files /dev/null and b/ReleaseClienti/DataUploader/images/LogoSteamware.png differ diff --git a/ReleaseClienti/DataUploader/logs/PlaceHolder.file b/ReleaseClienti/DataUploader/logs/PlaceHolder.file new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/ReleaseClienti/DataUploader/logs/PlaceHolder.file @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ReleaseClienti/DataUploader/packages.config b/ReleaseClienti/DataUploader/packages.config new file mode 100644 index 0000000..ba2dd7e --- /dev/null +++ b/ReleaseClienti/DataUploader/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/WebSCR.v11.suo b/WebSCR.v11.suo index f5ab42e..c331d12 100644 Binary files a/WebSCR.v11.suo and b/WebSCR.v11.suo differ diff --git a/WebSCR/Upload/Document.aspx.cs b/WebSCR/Upload/Document.aspx.cs index a815e8a..d7071d9 100644 --- a/WebSCR/Upload/Document.aspx.cs +++ b/WebSCR/Upload/Document.aspx.cs @@ -22,6 +22,10 @@ namespace WebSCR.Upload } protected void Page_Load(object sender, EventArgs e) { + if (memLayer.ML.confReadInt("_logLevel") > 6) + { + logger.lg.scriviLog("Inizio caricamento documento"); + } string answ = "ND"; /* * http://webscr.steamware.net/Rigamonti/Upload/Document?TIPOPROTOC=OC&NUMERO=000000&ESERPROTOC=2015&NUMEPROTOC=000000&DATAPROTOC=20150521&ESERRIFERI=&NUMERIFERI=&TIPORIFERI=&DATARIFERI=&NUMEDOCRIF=&DATADOCRIF=&ESERCOLLEG=&CLI_FOR=C000000&DESTINATAR=C000000&RGSOC_DEST=SE+CI+FOSSE&INDIR_DEST=OPZIONALE&LOCAL_DEST=OPZIONALE&CAP_DEST=OPZIONALE&ULT_AGG=20150521 @@ -86,6 +90,10 @@ namespace WebSCR.Upload // ora processo UPSERT... DtProxy.man.taDocs.upsert(TIPOPROTOC, NUMERO, ESERPROTOC, NUMEPROTOC, DATAPROTOC, ESERRIFERI, NUMERIFERI, TIPORIFERI, DATARIFERI, NUMEDOCRIF, DATADOCRIF, ESERCOLLEG, CLI_FOR, DESTINATAR, RGSOC_DEST, INDIR_DEST, LOCAL_DEST, CAP_DEST, ULT_AGG, ANNOTAZION); answ = "OK"; // registro in risposta che è andato tutto bene... + if (memLayer.ML.confReadInt("_logLevel") > 6) + { + logger.lg.scriviLog("Completato merge documento"); + } } catch (Exception exc) { @@ -129,6 +137,10 @@ namespace WebSCR.Upload Response.Clear(); Response.Write(answ); Context.Response.End(); + if (memLayer.ML.confReadInt("_logLevel") > 6) + { + logger.lg.scriviLog("Completato invio HTML"); + } } } } \ No newline at end of file diff --git a/WebSCR/bin/SteamWare.dll b/WebSCR/bin/SteamWare.dll index 6f4ac22..51156bd 100644 Binary files a/WebSCR/bin/SteamWare.dll and b/WebSCR/bin/SteamWare.dll differ diff --git a/WebSCR/bin/WebSCR.dll b/WebSCR/bin/WebSCR.dll index 5722f70..53266b6 100644 Binary files a/WebSCR/bin/WebSCR.dll and b/WebSCR/bin/WebSCR.dll differ diff --git a/WebSCR_data/bin/Release/SteamWare.dll b/WebSCR_data/bin/Release/SteamWare.dll index 6f4ac22..51156bd 100644 Binary files a/WebSCR_data/bin/Release/SteamWare.dll and b/WebSCR_data/bin/Release/SteamWare.dll differ diff --git a/WebSCR_data/obj/Release/WebSCR_data.csprojResolveAssemblyReference.cache b/WebSCR_data/obj/Release/WebSCR_data.csprojResolveAssemblyReference.cache index b68a1cb..9f6728b 100644 Binary files a/WebSCR_data/obj/Release/WebSCR_data.csprojResolveAssemblyReference.cache and b/WebSCR_data/obj/Release/WebSCR_data.csprojResolveAssemblyReference.cache differ