Crawler Help: Object reference not set to an instance of an object
I'm trying to write a custom crawler and having some difficulties. I'm getting the document information from a database. I'm trying to have the ClickThroughURL be a web URL and the IndexingURL be a UNC path to the file on a back-end file share. Also, I'm not using DocFetch. The problem I'm having is that when the crawler runs I get the following error for every card:
"4/19/05 13:43:30- (940) Aborted Card creation for document: TestDoc1. Import error: IDispatch error #19876 (0x80044fa4): [Error Importing Card.
Error writing Indexing File.
SOAP fault: faultcode='soap:Server' faultstring='Server was unable to process request. --> Object reference not set to an instance of an object.']"
Has anyone seen this before? Any help you can provide would be greatly appreciated. I have included the code from my document.vb in case that helps.
Thanks,
Jerry
DOCUMENT.VB
Imports System
Imports Plumtree.Remote.Util
Imports Plumtree.Remote.Crawler
Imports System.Resources
Imports System.Globalization
Imports System.Threading
Imports System.IO
Imports System.Data.SqlClient
Imports System.Text
Namespace Plumtree.Remote.CWS.MoFoDocsOpen
Public Class Document
Implements IDocument
Private m_logger As ICrawlerLog
Private DocumentLocation As String
Private d_DocumentNumber As Integer
Private d_Library As String
Private d_Name As String
Private d_Author As String
Private d_AuthorID As String
Private d_Category As String
Private d_ClientName As String
Private d_ClientNumber As String
Private d_DateCreated As DateTime
Private d_DocumentName As String
Private d_DocumentType As String
Private d_EnteredBy As String
Private d_EnteredByID As String
Private d_FolderID As String
Private d_KEFlag As String
Private d_LastEdit As DateTime
Private d_LastEditBy As String
Private d_LastEditByID As String
Private d_Maintainer As String
Private d_MaintainerID As String
Private d_MatterName As String
Private d_MatterNumber As String
Private d_Practice As String
Private d_Description As String
Private d_Version As Integer
Private d_Path As String
Private d_FileName As String
Public Sub New(ByVal provider As DocumentProvider, ByVal documentLocation As String, ByVal signature As String)
Dim location() As String = DocumentLocation.Split("||")
Me.DocumentLocation = DocumentLocation
Me.d_DocumentNumber = location(0)
Me.d_Library = location(2)
Dim objConn As New SqlConnection
Dim objCmd As New SqlCommand
Dim objRec As SqlDataReader
objConn.ConnectionString = "Server=sad2525;Database=PortalDocs;Uid=sa;Pwd=;"
objConn.Open()
objCmd.CommandText = "SELECT * FROM DocsOpenAggregate WHERE Library = '" & Me.d_Library & "' AND DocumentNumber = " & Me.d_DocumentNumber
objCmd.Connection = objConn
objRec = objCmd.ExecuteReader()
Do While objRec.Read() = True
Me.d_Name = objRec("Name")
Me.d_Author = objRec("Author")
Me.d_AuthorID = objRec("AuthorID")
Me.d_Category = objRec("Category")
Me.d_ClientName = objRec("ClientName")
Me.d_ClientNumber = objRec("ClientNumber")
Me.d_DateCreated = objRec("DateCreated")
Me.d_DocumentName = objRec("DocumentName")
Me.d_DocumentType = objRec("DocumentType")
Me.d_EnteredBy = objRec("EnteredBy")
Me.d_EnteredByID = objRec("EnteredByID")
Me.d_FolderID = objRec("FolderID")
Me.d_KEFlag = objRec("KEFlag")
Me.d_LastEdit = objRec("LastEdit")
Me.d_LastEditBy = objRec("LastEditBy")
Me.d_LastEditByID = objRec("LastEditByID")
Me.d_Maintainer = objRec("Maintainer")
Me.d_MaintainerID = objRec("MaintainerID")
Me.d_MatterName = objRec("MatterName")
Me.d_MatterNumber = objRec("MatterNumber")
Me.d_Practice = objRec("Practice")
Me.d_Description = objRec("Description")
Me.d_Version = objRec("Version")
Me.d_Path = objRec("Path")
Me.d_FileName = objRec("FileName")
Loop
objCmd = Nothing
If objRec.IsClosed = False Then objRec.Close()
objRec = Nothing
If objConn.State <> ConnectionState.Closed Then objConn.Close()
objConn = Nothing
End Sub
'If using DocFetch, this method returns a file path to the document in the backend repository.
Public Function GetDocument() As String Implements IDocument.GetDocument
m_logger.Log("Document.GetDocument called for " & Me.DocumentLocation)
Return Me.d_Path
End Function
'Returns the metadata information about this document.
Public Function GetMetaData(ByVal aFilter() As String) As DocumentMetaData Implements IDocument.GetMetaData
m_logger.Log("Document.GetMetaData called for " & DocumentLocation)
Dim DOnvp(23) As NamedValue
DOnvp(0) = New NamedValue("Author", Me.d_Author)
DOnvp(1) = New NamedValue("AuthorID", Me.d_AuthorID)
DOnvp(2) = New NamedValue("Category", Me.d_Category)
DOnvp(3) = New NamedValue("ClientName", Me.d_ClientName)
DOnvp(4) = New NamedValue("ClientNumber", Me.d_ClientNumber)
DOnvp(5) = New NamedValue("DateCreated", Me.d_DateCreated)
DOnvp(6) = New NamedValue("DocumentName", Me.d_DocumentName)
DOnvp(7) = New NamedValue("DocumentType", Me.d_DocumentType)
DOnvp(8) = New NamedValue("EnteredBy", Me.d_EnteredBy)
DOnvp(9) = New NamedValue("EnteredByID", Me.d_EnteredByID)
DOnvp(10) = New NamedValue("FolderID", Me.d_FolderID)
DOnvp(11) = New NamedValue("KEFlag", Me.d_KEFlag)
DOnvp(12) = New NamedValue("LastEdit", Me.d_LastEdit)
DOnvp(13) = New NamedValue("LastEditBy", Me.d_LastEditBy)
DOnvp(14) = New NamedValue("LastEditByID", Me.d_LastEditByID)
DOnvp(15) = New NamedValue("Maintainer", Me.d_Maintainer)
DOnvp(16) = New NamedValue("MaintainerID", Me.d_MaintainerID)
DOnvp(17) = New NamedValue("MatterName", Me.d_MatterName)
DOnvp(18) = New NamedValue("MatterNumber", Me.d_MatterNumber)
DOnvp(19) = New NamedValue("Practice", Me.d_Practice)
DOnvp(20) = New NamedValue("Description", Me.d_Description)
DOnvp(21) = New NamedValue("Version", Me.d_Version)
DOnvp(22) = New NamedValue("Path", Me.d_Path)
DOnvp(23) = New NamedValue("FileName", Me.d_FileName)
Dim metaData As New DocumentMetaData(DOnvp)
Dim strExt As String = Right(Me.d_FileName, Len(Me.d_FileName) - InStrRev(Me.d_FileName, "."))
Select Case LCase(strExt)
Case "xml"
metaData.ContentType = "text/xml"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "vsd"
metaData.ContentType = "application/vnd.visio"
metaData.ImageUUID = "{2CEEC472-7CF0-11d3-BB3A-00105ACE365C}"
Case "mpp"
metaData.ContentType = "application/vnd.ms-project"
metaData.ImageUUID = "{8D6D9F50-D512-11d3-8DB0-00C04FF44474}"
Case "pdf"
metaData.ContentType = "application/pdf"
metaData.ImageUUID = "{64FED895-D031-11D2-8909-006008168DE5}"
Case "doc"
metaData.ContentType = "application/msword"
metaData.ImageUUID = "{0C35DD71-6453-11D2-88C3-006008168DE5}"
Case "dot"
metaData.ContentType = "application/msword"
metaData.ImageUUID = "{0C35DD71-6453-11D2-88C3-006008168DE5}"
Case "rtf"
metaData.ContentType = "text/richtext"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "xls"
metaData.ContentType = "application/vnd.ms-excel"
metaData.ImageUUID = "{0C35DD72-6453-11D2-88C3-006008168DE5}"
Case "xlt"
metaData.ContentType = "application/vnd.ms-excel"
metaData.ImageUUID = "{0C35DD72-6453-11D2-88C3-006008168DE5}"
Case "pps"
metaData.ContentType = "application/vnd.ms-powerpoint"
metaData.ImageUUID = "{0C35DD73-6453-11D2-88C3-006008168DE5}"
Case "ppt"
metaData.ContentType = "application/vnd.ms-powerpoint"
metaData.ImageUUID = "{0C35DD73-6453-11D2-88C3-006008168DE5}"
Case "htm"
metaData.ContentType = "text/html"
metaData.ImageUUID = "{D2E2D5E0-84C9-11D2-A0C5-0060979C42D8}"
Case "html"
metaData.ContentType = "text/html"
metaData.ImageUUID = "{D2E2D5E0-84C9-11D2-A0C5-0060979C42D8}"
Case "asp"
metaData.ContentType = "text/plain"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "idq"
metaData.ContentType = "text/plain"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "txt"
metaData.ContentType = "text/plain"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "log"
metaData.ContentType = "text/plain"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case "sql"
metaData.ContentType = "text/plain"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
Case Else
metaData.ContentType = "application/octet-stream"
metaData.ImageUUID = "{F8F6B82F-53C6-11D2-88B7-006008168DE5}"
End Select
metaData.Name = Me.d_Name
metaData.Description = Me.d_Description
metaData.FileName = Me.d_FileName ' This is a file name - for example "2jd005_.DOC"
metaData.IndexingURL = Me.d_Path ' This is a file path - for example "\\fileserver01\docsd$\SF01\DOCS\MLS1\NONE\2jd005_.DOC"
metaData.ClickThroughURL = "http://mofoweb/docsopen.asp?Unique=" & HttpUtility.HtmlEncode(Me.DocumentLocation)
metaData.UseDocFetch = False
Return metaData
End Function
'Returns the signature or last-modified-date of this document that indicates to the portal whether the document needs refreshing.
Public Function GetDocumentSignature() As String Implements IDocument.GetDocumentSignature
Dim SigString As New StringBuilder
Dim SigEncode As String
SigString.Append(Me.d_DocumentNumber & "||")
SigString.Append(Me.d_Library & "||")
SigString.Append(Me.d_Name & "||")
SigString.Append(Me.d_Author & "||")
SigString.Append(Me.d_AuthorID & "||")
SigString.Append(Me.d_Category & "||")
SigString.Append(Me.d_ClientName & "||")
SigString.Append(Me.d_ClientNumber & "||")
SigString.Append(Me.d_DateCreated & "||")
SigString.Append(Me.d_DocumentName & "||")
SigString.Append(Me.d_DocumentType & "||")
SigString.Append(Me.d_EnteredBy & "||")
SigString.Append(Me.d_EnteredByID & "||")
SigString.Append(Me.d_FolderID & "||")
SigString.Append(Me.d_KEFlag & "||")
SigString.Append(Me.d_LastEdit & "||")
SigString.Append(Me.d_LastEditBy & "||")
SigString.Append(Me.d_LastEditByID & "||")
SigString.Append(Me.d_Maintainer & "||")
SigString.Append(Me.d_MaintainerID & "||")
SigString.Append(Me.d_MatterName & "||")
SigString.Append(Me.d_MatterNumber & "||")
SigString.Append(Me.d_Practice & "||")
SigString.Append(Me.d_Description & "||")
SigString.Append(Me.d_Version & "||")
SigString.Append(Me.d_Path & "||")
SigString.Append(Me.d_FileName & "||")
Dim encoding As New UTF8Encoding
Dim byteArray As Byte() = encoding.GetBytes(SigString.ToString())
SigEncode = System.Convert.ToBase64String(byteArray, 0, byteArray.Length)
Return SigEncode
End Function
'Returns an array of the users with access to this document.
Public Function GetUsers() As ACLEntry() Implements IDocument.GetUsers
'no acl info retrieved
Dim aclArray(-1) As ACLEntry
Return aclArray
End Function
'Returns an array of the groups with access to this document.
Public Function GetGroups() As ACLEntry() Implements IDocument.GetGroups
'no acl info retrieved
Dim aclArray(-1) As ACLEntry
Return aclArray
End Function
End Class
End Namespace
1. I don't think you can just set the index url to a unc path.
2. Try creating an index aspx page. In your MetaData.IndexURL set it to the index aspx page, and include query string params for the encoded unc path as well as the content type.
3. In the index servlet, get the content type and path from the query string
4. Get the filename from the file path
5. Set the headers for content-type and Content-Disposition, e.g.
Response.ContentType="application/msword"
Response.AddHeader("Content-Disposition", "inline; filename'" + filename)
6. Stream out the file:
FileStream fs = new FileStream(path, FileMode.Open)
byte[] buffer = new byte[40000]
int result
System.IO.Stream output = Response.OutputStream
do
result = fs.Read(buffer, 0, 40000)
output.Write(buffer, 0, result)
while (result == 40000)
put the above in a try-catch, and then delete the temp file in the finally block.
If this does not help, set a breakpoint in the code to find the error. Also use Log4Net to log any errors.
Similar Messages
-
Hi All,
When we do a test-outlookconnectivity -protocol:http the result is a success but then we get the following:
ClientAccessServer ServiceEndpoint Scenario
Result Latency
(MS)
xxxxxxxxxxxx... xxxxxxxxxxxxxx Autodiscover: Web service request. Success 46.80
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance
of an object.
Object reference not set to an instance of an object.
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
So it looks like it's not completing successfully.
I can't find anything on this in particular, and don't really know how to go about solving it - We are fully up to date, Exchange 2010 Sp2 with Rollup 5-v2
Any help appreciated!hi,
I have the same issue also on Exchange 2010 SP2 RU5v2
I ran your command and get the below
[PS] C:\Installs\report\Activesync>Test-OutlookConnectivity -Protocol:http |FL
RunspaceId : ebd2c626-1634-40ad-a17e-c9a713d1a62b
ServiceEndpoint : autodiscover.domain.com
Id : Autodiscover
ClientAccessServer : CAS01.domain.com
Scenario : Autodiscover: Web service request.
ScenarioDescription :
PerformanceCounterName :
Result : Success
Error :
UserName : Gazpromuk.intra\extest_645e41faa55f4
StartTime : 8/21/2013 4:08:50 PM
Latency : 00:00:00.1250048
EventType : Success
LatencyInMillisecondsString : 125.00
Identity :
IsValid : True
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
+ CategoryInfo : NotSpecified: (:) [Test-OutlookConnectivity], NullReferenceException
+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Monitoring.TestOutlookConnectivityTask
Any help would be greatly appreciated, I also get random failures of OWA, EAS and web services, very frustrating
I have no errors in the app event log
thanks
Faisal Saleem Windows Systems Analyst 07595781867 -
"object reference not set to an instance of an object" error while running ssrs report locally
Hi Folks,
I am a bit new to SSRS.
I am using ssrs 2012 and trying to use a method from a dll file. I am loaded the assembly file in reference of the report.
Now I am trying to use a static method from the Dll. e.g. applicationName.classname.MethodName()
But while running the report I am getting "object reference not set to an instance of an object" error.
For a note I am trying execute the report locally.
Any help would be highly appreciable.
sarat chandra sahooSorry for late reply Sinaloe..
I have added a dll file in my report reference. And in a textbox trying to execute this below.
=Recall.Common.LocalizationEx.Localization.GetString(Parameters!Culture.Value, "RFID", "BICustomerPortal")
where Getstring() is a static method in the dll.
I guess some configuration setting I am missing here.
1. I have copied these dlls in "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies" and "C:\Windows\Assembly".
sarat chandra sahoo -
Object reference not set to an instance of an object error with Import data
Hi Experts,
We are using BPC 7.5M with SQL Server 2008 in Multiserver environment, I am getting an error "Object reference not set to an instance of an object." while running Import data package, earlier we use to get this error sometime(once in a month) but it goes away if we reboot the application server but this time I have rebotted the Application server multiple times but still getting the same error.
Please Advice.
Thanks & Regards,
RohitHi Rohit,
please see the sap note 1615837, maybe this help you.
Best regards
Roberto Vidotti -
I'm running this command in the Azure PowerShell to deploy my node project as a service:
Publish-AzureServiceProject -ServiceName <name> -Location "East US"
Using my service name instead of <name>.
Each time I run this, I get an error:
Publish-AzureServiceProject : Object reference not set to an instance of an
object.
At line:1 char:1
+ Publish-AzureServiceProject -ServiceName <name> -Location "East US"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Publish-AzureServiceProject], N
ullReferenceException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.CloudService.Pub
lishAzureServiceProjectCommand
I have added my certificate and verified it with Get-AzureSubscription.
Can anyone help?When I run Get-AzureSubscription, the subscription already seems to be set. I assume this happened when I imported my publish settings. I tried your suggestion to do it manually, but this didn't fix my problem.
I've started implementing the deployment script linked in the blog post, but I'm running into all sorts of problems as I try to do so. First, this seems to assume I have a service package and publish settings. I'm guessing the package is going to need to
be generated for each deployment, but the script doesn't handle this. How can I also have the script generate the new package so that the service can be deployed? I've currently hard-coded the path of cspack into the script, but this seems like a bad way to
do it.
Since the publish settings have the certificate, I imagine I don't want to commit those to version control. Can I also generate this as part of the script? I want the script to be as hands-off as possible.
Thank you for your help! -
Object reference not set to an instance of an object in treeView
Hello
I wrote this code. I have this Error "Object reference not set to an instance of an object" on " MessageBox.Show(tn.Text);"
in " MaintreeView_BeforeSelect ".
#region Remove BackColor of all treeview nodes
private void ClearBackColor()
TreeNodeCollection nodes = MaintreeView.Nodes;
foreach (TreeNode tn in nodes)
ClearRecursive(tn);
private void ClearRecursive(TreeNode treeNode)
foreach (TreeNode tn in treeNode.Nodes)
tn.BackColor = Color.Empty;
if(tn.IsSelected == true)
tn.TreeView.SelectedNode = null;
ClearRecursive(tn);
#endregion
private void MaintreeView_BeforeSelect(object sender, TreeViewCancelEventArgs e)
ClearBackColor();
TreeNode tn = MaintreeView.SelectedNode;
if (tn != null)
MessageBox.Show(tn.Text);
if (tn.Level == 7)Hi ARZARE,
I tested your code, it can show the tn.Text when in the rootnode.
I suggest you putting the ClearBackColor() at the last of the BeforeSelect Event. Or this method will clear the selectNode.
private void treeView1_BeforeSelect(object sender, TreeViewCancelEventArgs e)
//ClearBackColor();
TreeNode tn = this.treeView1.SelectedNode;
if (tn != null)
MessageBox.Show(tn.Text);
ClearBackColor();
If you have any other concern regarding this issue, please feel free to let me know.
Best regards,
Youjun Tang
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Object reference not set to an instance of an object on clicking BI Tab
Hi,
I have installed Oracle BI Publisher Desktop 11.1.1.6.0 for 32 bit Office on Windows XP, Microsoft Word 10.
However, after successful installation, when I open word and click on BI Publisher Tab , it throws error "Object reference not set to an instance of an object".
Please help me resolve this setup issue.
Thanks in Advance.
Cheers,
SarikaHi,
This is a general error message. I would ask the following questions to verify the issue:
1. Are these charts inside the table?
2. Does the table display fine? What’s the size of the report and charts?
Please try download the latest cumulative update package for SQL Server 2008 R2 Service Pack 2 from the following link and see if it address the issue:
http://support.microsoft.com/kb/2730301/en-us
You can also capture the screenshots regarding the issue so that I can understand
problem in more details.
Thanks.
Tracy Cai
TechNet Community Support -
Hi, My name is Leonard and I am studying SQL. I have downloaded the newest MS SQL 2012 and also MS 2012 Hyper-V. I have set a MS 2012 Hyper-V on a laptop with AMD Turion 64 X2 and 3G of RAM (Planing
to add more to max at 8G).
Following the instructions in the free online
Administering Microsoft SQL Server 2012 Databases” Training Kit, I have set 6 virtual machines as instructed in the Training Kit. While the installation of the MS Server Core 2008 R2 SP1 completed with no
problem, the same cannot be said for the SQL Server 2012 installation. I have encountered an error that I have not seen anyone address in any of the SQL web forums.
After running the unattended setup instruction (Setup.exe /qs /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=MSSQLSERVER
/SQLSVCACCOUNT="Njowa\Pa$$worD>" /SQLSVCPASSWORD=" Pa$$worD” /SQLSYSADMINACCOUNTS="Njowa\lenny#4!@" /AGTSVCACCOUNT="NT AUTHORITY\Network Service"
/IACCEPTSQLSERVERLICENSETERMS) this is what I get after a series SQL setup
initiation windows popups then disappears.
The following error occurred:
Object reference not set to an instance of an object.
Error result: -2147467261
Result facility Code: 0
Result error Code: 16387
Please review the summary.txt log for further details
My question is: What instance of an object is not properly initialize in the Setup instructionsHello,
Please note that SQL Server requires at least 1 GB of RAM. The operating system (Windows Server) requires 2 GB of RAM (recommended) or 512 MB (minimum). This means any virtual machine that will receive the installation of a SQL Server instance requires 1.5
or 2 GB at least.
The behavior of SQL Server setup tells me that the virtual machine does not have enough memory assigned or .NET Framework 3.5 was not enable on Control Panel->Program
and Features before trying to install SQL Server.
The following thread is about another possible cause of this error:
http://social.msdn.microsoft.com/Forums/mr-IN/sqlsetupandupgrade/thread/575d3025-69f5-4152-a473-44496b008811
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com -
Object Reference Not Set To An Instance Of An Object - Outlook Add-In - Add-In Express
Hi,
My Add-In has been developed in VS2010 using the Add-In Express pack.
Its a very simple add-in that shows an IT support ticket email detailing PC information. To use it, following installing the add-in, the user must select the tab in outlook and click on the Send IT Support Email button which will generate an Outlook Email
Template with specific information about the PC that I pull using VB.
It works fine in Windows 7 & 8, but throws an 'Object Reference Not Set To An Instance Of An Object' exception in Windows XP. Screenshot is shown below:
The code is below
Imports System.Runtime.InteropServices
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports AddinExpress.MSO
Imports System.Object
Imports System.Net
Imports System.Environment
Imports System.Net.NetworkInformation
Imports System.Windows.Forms.Application
Imports Microsoft.Office.Interop.Outlook
Imports outlook = Microsoft.Office.Interop.Outlook
'Add-in Express Add-in Module
<GuidAttribute("735B7BC8-DD2F-44D8-BC37-30D86769C065"), ProgIdAttribute("$safeprojectname$.AddinModule")> _
Public Class AddinModule
Inherits AddinExpress.MSO.ADXAddinModule
#Region " Add-in Express automatic code "
'Required by Add-in Express - do not modify
'the methods within this region
Public Overrides Function GetContainer() As System.ComponentModel.IContainer
If components Is Nothing Then
components = New System.ComponentModel.Container
End If
GetContainer = components
End Function
<ComRegisterFunctionAttribute()> _
Public Shared Sub AddinRegister(ByVal t As Type)
AddinExpress.MSO.ADXAddinModule.ADXRegister(t)
End Sub
<ComUnregisterFunctionAttribute()> _
Public Shared Sub AddinUnregister(ByVal t As Type)
AddinExpress.MSO.ADXAddinModule.ADXUnregister(t)
End Sub
Public Overrides Sub UninstallControls()
MyBase.UninstallControls()
End Sub
#End Region
Public Shared Shadows ReadOnly Property CurrentInstance() As AddinModule
Get
Return CType(AddinExpress.MSO.ADXAddinModule.CurrentInstance, AddinModule)
End Get
End Property
Private Sub AddInModule_AddInInitiatize(ByVal sender As Object, ByVal e As EventArgs) _
Handles MyBase.AddinInitialize
'Outlook 2010 = 14
If Me.HostMajorVersion >= 14 Then
AdxOlExplorerCommandBar1.UseForRibbon = False
End If
End Sub
Public ReadOnly Property OutlookApp() As Outlook._Application
Get
Return CType(HostApplication, Outlook._Application)
End Get
End Property
'Gets the MAC Address from the NIC Information
Function getMacAddress()
Dim nics() As NetworkInterface = _
NetworkInterface.GetAllNetworkInterfaces
Return nics(0).GetPhysicalAddress.ToString
End Function
Sub CreateTemplate()
Dim sHostName As String
Dim sDomain As String
Dim sUserName As String
Dim sOS As String
Dim s64 As String
Dim sMAC As String
Dim host As String = System.Net.Dns.GetHostName()
Dim LocalHostaddress As String = System.Net.Dns.GetHostEntry(host).AddressList(1).ToString()
Dim MyItem As Outlook.MailItem
'Finds the PC Number
sHostName = Environ$("computername")
'Finds the Domain
sDomain = Environ$("userdomain")
'Finds the Username logged into the PC
sUserName = (Environment.UserDomainName & "\" & Environment.UserName)
'Finds the Operating System
sOS = (My.Computer.Info.OSFullName)
'Shows the results collected from the getMacAddress Function in the sMac variable
sMAC = getMacAddress()
'Finds the Architecture of the Operating System - x86 or x64
If (Environment.Is64BitOperatingSystem) Then
s64 = ("64bit")
Else
s64 = ("32bit")
End If
'Creates a Template Email
MyItem = OutlookApp.CreateItem(Outlook.OlItemType.olMailItem)
'Configures the Sender as [email protected]
MyItem.To = "[email protected]"
'Shows the template
MyItem.Display()
'Shows all of the string in the Email Body
MyItem.HTMLBody = String.Concat("<b><u>IT SUPPORT TICKET</u></b>", "<br/><br/>", "<tr><b>PC Number: </b></tr>", sDomain, "\", sHostName, "<b></b>", "<br/><br/>", "<b>Username: </b>", sUserName, "<b></b>", "<br/><br/>", "<b>OS Version: </b>", sOS, s64, "<b></b>", "<br/><br/>", "<b>IP Address: </b>", LocalHostaddress, "<b></b>", "<br/><br/>", "<b>MAC Address: </b>", sMAC, "<b></b>", "<br/><br/>", "<b>Comment:</b>", "<br/>", "<i>Please give a brief description of your problem attaching a screen shot if possible</i>", "<br/><br/>") & MyItem.HTMLBody
End Sub
Private Sub AdxRibbonButton1_OnClick(ByVal sender As Object, ByVal control As IRibbonControl, ByVal pressed As Boolean) Handles AdxRibbonButton1.OnClick
'Runs CreateTemplate
CreateTemplate()
End Sub
Private Sub AdxCommandBarButton1_Click(ByVal sender As Object) Handles AdxCommandBarButton1.Click
'Runs CreateTemplate
CreateTemplate()
End Sub
End Class
I would appreciate any help with this whatsoever as I am pulling my hair out!!
Many Thanks!!
ChrisHi,
Welcome to MSDN forum.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Because your Add-in is developed using Add-in Express which is third-party, I suggest consulting Add-in Express forum:
http://www.add-in-express.com/forum/index.php for better support.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
"Object reference not set to an instance of an object" when using Sheel Shah's example
I am attempting to use a custom add dialog as in http://blogs.msdn.com/b/lightswitch/archive/2011/07/07/creating-a-custom-add-or-edit-dialog.aspx and
I get the error "Object reference not set to an instance of an object." when clicking my button to AddEntity(). My code to call the control is:
User u = new User();
userdialoghelper.AddEntity(u);
Any ideas as to why I'm getting this error? I "think" that I've set up the class properly?
ScottI may be a couple of years late to the party here (using VS2013) but I also had some issues adapting to Yann's improvements over Sheel's code.
Sheel's screen code as provided has the word "Old in the InitializeDataWorkspace and the created methods. this does not work when copy/pasted. ALso removed the "UI" from "InitialiseUI()"
Following code can be used with Yann's Helper Class.
Namespace LightSwitchApplication
Public Class EditableCustomersGrid
Private customersDialogHelper As ModalWindow
Private Sub EditableCustomersGrid_InitializeDataWorkspace(saveChangesTo As System.Collections.Generic.List(Of Microsoft.LightSwitch.IDataService))
customersDialogHelper = New ModalWindow(Me.Customers, "CustomerViewDialog")
End Sub
Private Sub EditableCustomersGrid_Created()
customersDialogHelper.Initialise()
End Sub
Private Sub gridAddAndEditNew_CanExecute(ByRef result As Boolean)
customersDialogHelper.CanAdd()
End Sub
Private Sub gridAddAndEditNew_Execute()
customersDialogHelper.AddEntity()
End Sub
Private Sub gridEditSelected_CanExecute(ByRef result As Boolean)
customersDialogHelper.CanView()
End Sub
Private Sub gridEditSelected_Execute()
customersDialogHelper.ViewEntity()
End Sub
Private Sub EditDialogOk_Execute()
customersDialogHelper.DialogOk()
End Sub
Private Sub EditDialogCancel_Execute()
customersDialogHelper.DialogCancel()
End Sub
End Class
End Namespace -
"Object reference not set to an instance of an object" error in SAPBO 9.0 PL08
Hi Experts,
I developed Customized Addon and created.ard file using B1 DE 2.2 version. But when we installed in the client place,Addon is connecting and status is showing "Connected" at the same time we are getting an error "Object reference not set to an instance of an object" . Please find the enclosed screen shot for your reference.
In the debug mode, am not getting any error and addon is working perfectly.
I need clarification --->PL08 SDK is required to create .ard file (OR) PL05 SDK is sufficient ??
Before this am getting error "You are not connected to the company" while connecting addon,that is resolved.
Now am facing this problem, Please help me out to resolve this issue.
Thanks & Regards
KMJHi Maik Delly,
I created the addons for SAPB1 8.81/8.82 SQL Server 2008 R2 environment from the same source code which is working fine till now without any error.
But why all of sudden we are getting this error for SAP B1 9.0 PL08 and SQL Server 2012 R2 environment.
In my system i have .net framework 3.5 SP1 and .Net Compact framework 1.0 and 2.0 installed. Addon is connecting and working also without any error for the same environment.
Some Clarification needed
1) SAP B1 9 PL05 SDK sufficient to create .ard file for SAP B1 9 PL08 environment ?
Awaiting for suggestions and advices to resolve this issue.
Thanks & Regards
KMJ -
Hi,
(1) I am trying to get the data from a database table and import into a text file.
(2) If the record set have the data then it runs ok
(3) when the record set not having any data it is giving the below error
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
Could you please let me know why this is happening?
Any help would be appriciated
Thanks,
SIVYou might ask them over here.
http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral%2Ccsharpgeneral%2Cvcgeneral&filter=alltypes&sort=lastpostdesc
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
I have a csv file that I need to generate a schema for. I am trying to generate a schema using flat file schema wizard but I keep getting "Object reference not set to an instance of an object." error when I am clicking on the Next button after
specifying properties of the child elements on the wizard. At the end I get schema file generated but it contains an empty root record with no child elements.
I thought may be this is because I didn't have my project checked out from the Visual SourceSafe db first but I tried again with the project checked out and got the same error.
I also tried creating a brand new project and generating a schema for it but got the same error.
I am not sure what is causing Null Reference exception to be thrown and there is nothing in the Windows event log that would tell me more about the problem.
I am using Visual Studio 2008 for my BizTalk development.
I would appreciate if some has any insides on this issue.Hi,
To test your environment, create a new BizTalk project outside of source control.
Create a simple csv file on the file system.
Name,City,State
Bob,New York,NY
Use the Flat file schema Wizard to create the flat file schema from your simple csv instance.
Validate the schema.
Test the schema using your csv instance.
This will help you determine if everything is ok with you environment.
Thanks,
William -
I am trying to create a custom timer job and while deploying it getting the error as:
Error occurred in deployment step 'Activate Features': Object reference not set to an instance of an object.
where am i going wrong?please suggest...
Thanks
Suu30I am not able to get the errors.So attaching the error log files here.Please help
08/21/2012 17:35:03 1 INF Entering function PsconfigUserInterfaceMain.Main
08/21/2012 17:35:03 1 INF Entering function Common.SetCurrentThreadCultureToInstalledCulture
08/21/2012 17:35:03 1 INF Entering function Common.SetThreadCultureToInstalledCulture
08/21/2012 17:35:03 1 INF Current thread culture is English (United States), current thread ui culture is English (United States), installed culture is English (United States)
08/21/2012 17:35:03 1 INF Leaving function Common.SetThreadCultureToInstalledCulture
08/21/2012 17:35:03 1 INF The current ui culture English (United States) is NOT right to left
08/21/2012 17:35:03 1 INF Leaving function Common.SetCurrentThreadCultureToInstalledCulture
08/21/2012 17:35:03 1 INF Creating the psconfig application context
08/21/2012 17:35:03 1 INF Entering function PsconfigApplicationContext.PsconfigApplicationContext
08/21/2012 17:35:03 1 INF Entering function UserInterface.UserInterface
08/21/2012 17:35:03 1 INF Leaving function UserInterface.UserInterface
08/21/2012 17:35:03 1 INF Entering function TaskDriver.TaskDriver
08/21/2012 17:35:03 1 INF Entering function TaskDriver.BuildCommandCollection
08/21/2012 17:35:03 1 INF Entering function CommandCollectionBase.CommandCollectionBase
08/21/2012 17:35:03 1 INF Leaving function CommandCollectionBase.CommandCollectionBase
08/21/2012 17:35:03 1 INF Entering function CommandCollection.CommandCollection
08/21/2012 17:35:03 1 INF Leaving function CommandCollection.CommandCollection
08/21/2012 17:35:03 1 INF Entering function CommandCollectionBase.CommandCollectionBase
08/21/2012 17:35:03 1 INF Leaving function CommandCollectionBase.CommandCollectionBase
08/21/2012 17:35:03 1 INF Creating the APPLICATION bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the APPLICATION bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Creating the SINGLESERVER bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the SINGLESERVER bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the V2V_INPLACE_UPGRADE bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the V2V_INPLACE_UPGRADE bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the CLEAN_INSTALL bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the CLEAN_INSTALL bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the B2B_UPGRADE bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the B2B_UPGRADE bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the SKU2SKU_UPGRADE bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the SKU2SKU_UPGRADE bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the runningupgrade bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the runningupgrade bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Initialze
08/21/2012 17:35:03 1 INF Leaving function Parameter.Parameter
08/21/2012 17:35:03 1 INF Entering function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Creating the LanguagePackInstalled bool exposed parameter
08/21/2012 17:35:03 1 INF Leaving function BoolExposedParameter.BoolExposedParameter
08/21/2012 17:35:03 1 INF Entering function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Creating the LanguagePackInstalled bool internal parameter
08/21/2012 17:35:03 1 INF Leaving function BoolInternalParameter.BoolInternalParameter
08/21/2012 17:35:03 1 INF Entering function Parameter.Parameter -
Hello,
As you can tell from the title of this question, I am no expert with GPO's. Before I begin, I spent a few minutes to an hour searching and reading in hopes of finding the solution and avoid putting myself out there as a "GPO Newb". While
I found several posts and answers that were similar and were related, the questions and answers were more advanced and did present the solutions providing the person had initial knowledge already. That is not necessarily my case and I would ask for a
little patience and a bit of 'hand-holding' for what I need.
I run SBS 2011, and in Group Policy Management I have a custom GPO. In this GPO I define all my settings. I understand this may not be the best or most practical method of applying policies, but I am not very strict and have few settings. This
policy existed prior to my joining the company, and was migrated in to this SBS '11 from SBS '03. That may be the issue, but before making any changes I am seeking expert advice.
When I select that GPO, named "Main GPO", and click on the tab at the top "Settings" I see the error: "An error occurred while generating report: Object reference not set to an instance of an object."
I saw that when I right click the GPO > View > Options and select the tab "Reporting" that it states that for reporting to work the location of the .adm files must be specified. I see that my option for the location is set to "Default"
which by my guessing would be located in the C:\Windows\sysvol directory. Below is what I see there:
C:\Windows\sysvol\domain
C:\Windows\sysvol\staging
C:\Windows\sysvol\staging areas
C:\Windows\sysvol\sysvol
I think the problem is that my custom GPO are not inside the default location, which I speculate is: C:\Windows\sysvol\domain\policies (which I do see some objects there).
But instead I also see items in this folder: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies (while where I just typed 'JOHN.LOCAL' is my actual local domain).
To further this, when I edit that custom GPO, then at the very top of the tree I right click on it and select Properties, I see a Unique Name listed there as a long string of numbers and letters, similar to a registry entry. I searched my server for
that same Unique Name and found it listed inside the folder: C:\Windows\sysvol\domain\policies
If I am correct with my assumption and basic knowledge, I should move all objects as follows:
-Move FROM: C:\Windows\sysvol\domain\policies
-Move TO: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies
My concerns are that I am not correct at all, that I will break something, that there may be an easier fix than moving anything, or that I am overlooking something causing this error altogether.
Thank you for anyone's help and time with assisting me with this request.
John Fester> top "Settings" I see the error: "An error occurred while generating
> report: Object reference not set to an instance of an object."
That's due to a security setting (most possibly) your current OS does
not understand. Hard to find out wich exact setting it is... To resolve
this issue, we need the gtpptmpl.inf file residing in the policiy's
sysvol folder. To open this folder, edit the policy, move to computer
settings - policies - windows settings - scripts - startup, press "show
files". Then move two folders upwards and back down to
.\microsoft\windows nt\secedit. There you'll see the gpttmpl.inf - post
its contents and we'll have a look at it.
> location, which I speculate is: C:\Windows\sysvol\domain\policies (which
> folder: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies (while where I just
That's perfectly ok - JOHN.LOCAL in fact is a symlink pointing to "domain".
> all objects as follows:
> -Move FROM: C:\Windows\sysvol\domain\policies
> -Move TO: C:\Windows\sysvol\sysvol\JOHN.LOCAL\policies
No.
Martin
Mal ein
GUTES Buch über GPOs lesen?
NO THEY ARE NOT EVIL, if you know what you are doing:
Good or bad GPOs?
And if IT bothers me - coke bottle design refreshment :))
Maybe you are looking for
-
Apple TV does not work OS X Yosemite. Image skips. Never had a problem before. It was after the update OS X Yosemite.
-
Frame rate = One picture in 5 seconds?
Hi, I am capturing video from a web cam in rgb. I want to send only one picture in five seconds across the network (Frame Rate = 0,2). This does not seem to work. My code: Object frameRate = processor.getControl("javax.media.control.FrameRa
-
Spot healing brush - i have icon for healing brush - why not this one? Ps cc
i have Photoshop cc and watched a tutorial which uses the spot healing brush - the icon looks like an x made of arrows, you hover and it gives you choices. mine does not have the content aware move tool icon, only the brush. is there a way to turn
-
I accidentally hit something turning off my ctrl + t shortcut for free transform tool. This now will open and close my text tab. How do I get this back to free transform?
-
How to get a text between two XML tags?
Hello everybody! I've got a problem! How can I extract a text that is between tags, like <myTag> My text </myTag> I have no problem to get the attributes inside the tags, however, i don't know how to get some text that is between tags. Here is my xml