I've looked at some of the things you mentioned, but as a newbie, it seems above my skills at this point. So I am going to just try to use the .aspx page and fully qualify it.
Now the problem I am having is connecting to the database. It works when I run the UC in a Test.aspx page outside of DNN, but after installing it into DNN, I get the error related to BuildManager.GetType (i.e. same issue as this:
Here). Here's what I'm doing:
Imports System.Data
Imports System.Data.SqlClient
Partial Class lib_ShowPicture
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ID As Integer = Convert.ToInt32(Request.QueryString("ID"))
Dim strType As String = Request.QueryString("type").ToString
Dim strSQL As String
'Connect to the database and bring back the image contents & MIME type for the specified picture
Using myConnection As New SqlConnection(ConfigurationManager.ConnectionStrings("SiteSqlServer").ConnectionString)
Select Case strType
Case Is = "bike"
strSQL = "SELECT [MIMEType], [PictureData] as BinaryData FROM [Dyno_UserBikes] WHERE [UserBikeID] = @ID"
Case Is = "dyno"
strSQL = "SELECT [MIMEType], [ChartBinary] as BinaryData FROM [Dyno_DynoRuns] WHERE [DynoRunID] = @ID"
End Select
Dim myCommand As New SqlCommand(strSQL, myConnection)
myCommand.Parameters.AddWithValue("@ID", ID)
myConnection.Open()
Dim myReader As SqlDataReader = myCommand.ExecuteReader
If myReader.Read Then
If Not IsDBNull(myReader("BinaryData")) Then
Response.ContentType = Trim(myReader("MIMEType").ToString())
Response.BinaryWrite(myReader("BinaryData"))
'Response.OutputStream.Write( myReader("PictureData"))
Else
Response.Write("No Picture Uploaded")
End If
End If
myReader.Close()
myConnection.Close()
End Using
End Sub
End Class
Getting this error:
AssemblyVersion: 5.5.1
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL:
AbsoluteURL:
AbsoluteURLReferrer:
UserAgent:
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: ce21afd6-4566-403a-9929-6b96aa16ec49
InnerException: Could not load type 'Incite.Modules.Dyno_Garage.Dyno_GarageController'.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Compilation.BuildManager.GetType
StackTrace:
Message: System.Web.HttpException: Could not load type 'Incite.Modules.Dyno_Garage.Dyno_GarageController'. at System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) at DotNetNuke.Framework.Reflection.CreateType(String TypeName, String CacheKey, Boolean UseCache, Boolean IgnoreErrors)