Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Import the following two namespaces, and then implement the class:Imports System.Net
Imports System.Security.Cryptography.X509Certificates
Public Class MyPolicy
Implements ICertificatePolicy
Public Function CheckValidationResult(ByVal srvPoint As ServicePoint, _
ByVal cert As X509Certificate, ByVal request As WebRequest, _
ByVal certificateProblem As Integer) _
As Boolean Implements ICertificatePolicy.CheckValidationResult
'Return True to force the certificate to be accepted.
Return True
End Function
End Class
System.Net.ServicePointManager.CertificatePolicy = New MyPolicy()
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="microsoft.web.services2" type="Microsoft.Web.Services2.Configuration.WebServicesConfiguration, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</configSections>
<system.web>
<compilation defaultLanguage="vb" debug="true" />
<customErrors mode="RemoteOnly" />
<authentication mode="Windows" />
<identity impersonate="true"/>
<authorization>
<allow users="*" />
<deny users="?" />
</authorization>
</system.web>
</configuration>
Imports Client.webservice
Imports System.IO
Imports System.Net
Protected Shared wsclient As ODPService
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
End Sub
'************************************************************************
'This method initializes the page
'************************************************************************
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
'Create the Web Service proxy instance
wsclient = New ODPService
End Sub
#End Region
Dim AsyncWEBServiceProxy As ODPService
Dim AsyncResult As IAsyncResult
'************************************************************************
'This method is called every time the page is loaded
'************************************************************************
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
System.Net.ServicePointManager.CertificatePolicy = New Cert
wsclient.Credentials = CredentialCache.DefaultCredentials
'Check if the database connection is alive
connected = wsclient.isConnected()
'page cut off for brevity