 |
|
 |
hello,
does the same method apply for conversion of a classic asp website to sharepoint site. we dont have a BLL for the concerned application but we do have a data layer.
|
|
|
|
 |
|
 |
i guess it should work. i ahave not done it but the same must work. Try and let me know. Thanks
Srivatsan
|
|
|
|
 |
|
 |
Hello dear
I create a page in my project
when I don't have any connection to database work true
but when I create a page with sql connection I recieve this error
please give me help for troubleshooting ...
this is my error page ...
__________________________________________
<b>Server Error in '/' Application.</b>
--------------------------------------------------------------------------------
Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[SecurityException: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.PermissionSet.Demand() +81
System.Data.Common.DbConnectionOptions.DemandPermission() +55
System.Data.SqlClient.SqlConnection.PermissionDemand() +39
System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) +22
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
man.man.Button1_Click(Object sender, EventArgs e) in C:\Users\Administrator\Documents\Visual Studio 2008\Projects\man\man\man\man.aspx.vb:13
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7350
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.c2f7ae50_1c39_4846_97f5_06e56efbd7ea__533470394.ProcessRequest(HttpContext context) +29
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +358
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1434; ASP.NET Version:2.0.50727.1434
|
|
|
|
 |
|
 |
In the safe assemblies in the web.config, there are some dlls for data sources, please see if those are allowed is true. Guess that should solve your problem
Srivatsan
|
|
|
|
 |
|
 |
You need to follow these steps,
1. Open solution explorer-->;Click Project Properties-->; Click Security tab-->;Tick 'Enable Click One Security settings'.
2. Ensure you have selected 'This is a full trust application', or appropriate security settings.
3. Recompile and run.
|
|
|
|
 |
|
 |
Hi
Is it possible to extract the contents of a forum that is built on JSP and import it into sharepoint 2007 site?
The solution that you have given is working in such a way that it adds a new aspx page to the sharepoint site but i want the following to be possible
-> Only the contents (Question and Answers) of the forum should be extracted
-> The contents that are extracted should be displayed in a discussion board in sharepoint
-> This importing should be independant of the language used for the creation of the forum
Thanks in advance
|
|
|
|
 |
|
 |
the solution consists of the main project, BLL, DAL, Utils and web deployment project. Tried to place the web deployment project in some other directory, it is not allowed. If you know how to fix, could you please provide a newbie level instructions =)
Thank you!
|
|
|
|
 |
|
 |
When you add a web deployment project by right clicking the web project and choosing Add Web Deployment Project, it will create the project in some directory which itself i think will be right. If this does not answer your question, then please let me know the folder structure of your project and i can tell if you have it right or wrong.
Usually it is
Folder
--Solution file
--Web Project Folder
--Deployment Project folder
Srivatsan
|
|
|
|
 |
|
 |
I notice in Step 3, we are supposed to import the ASPX page, do I need to import the ASCX page or any image file associated with it? How about .aspx.resx files? Basically, what files are needed to be imported other than aspx page. Or aspx page is enough?
Thanks in advance.
|
|
|
|
 |
|
 |
Any file that is required for the rendering of the ASPX page has to be uploaded. After uploading, make sure that the reference paths are right.
Srivatsan
|
|
|
|
 |
|
 |
Hi,
I am not sure what aspx page I am supposed to import in Step 3,Item #3.
1. Which is my "local folder", my original web app project folder or the deployment project folder?
2.And which aspx page am I supposed to import, is it the start-up aspx in my web application project?
Thanks in advance. Your help would be greatly appreciated.
|
|
|
|
 |
|
 |
I guess you are trying to put a webpage into a Sharepoint site. If yes then you have to import the ASPX file into the site usign the Sharepoint Designer's import option.
Alternatively you can place the files in your file system into the _layouts folder.
Srivatsan
|
|
|
|
 |
|
 |
1) You have to take the ASPX pages that are part of your web application. If you have added your web deployment project, then you have to go into the web deployment project folder and then to Debug/Release folder and then select the ASPX pages from there. Here local folder is the web deployment project folder where your "to be deployed" files will reside.
2) You have to upload all the ASPX pages that are part of your web application. All of them that has to be there in the Sharepoint context.
Srivatsan
|
|
|
|
 |
|
 |
Hi,
I have a couple dlls that are used in the ASP.NET project, which are not created by me.
As stated in Step 2 of this article:
Item 4: needs to be added, how do I know those dlls' namespace and assembly name?
Item #5: Same question for this, how do I mark the dlls so that they will be "AllowParticallyTrusted"?
Thanks in advance. Your help would be greatly appreciated.
modified on Wednesday, February 4, 2009 2:28 PM
|
|
|
|
 |
|
 |
Teh partially trusted is for using it from outside the GAC. In your case, you can put the DLLs in the GAC and then change the refereces in your web.config to point to the GAC dlls.
To know the namespaces used in any asembly, you have to run the MSIL Disassembler which comes part of the .NET SDK. It is usually found in the following location (Programs-->.NET Framework SDK-->tools)
or the following path - C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe
Srivatsan
|
|
|
|
 |
|
 |
Thanks for your response. BTW, what is GAC and how can I put the DLLs in GAC. Please advice.
|
|
|
|
 |
|
 |
1) You can find the assembly and the namespace from the MSIL disassembler usually found in the following location
"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe"
2) You have to have the other party that gave you the DLL to sign it and allow it for partially trusted. But i think when you make trust level full then yuo may not require partially trusted. Please try it and let me know. In fact you dont even have to sign it.
Srivatsan
|
|
|
|
 |
|
 |
What changes must i make in my SharePoint's Web.config for it to allow ODBC connection?
Please help!
|
|
|
|
 |
|
 |
Hi,
May I know if the article is applicable to sharepoint server 2007 only? I am using window server 2003 sharepoint service 2.0. When I create a new virtual server, there is no default bin folder in c:\inetpub\wwwroot\wss\virtualdirectories\\bin. I can only find bin folders in IIS under the folder _vti_bin and _layouts. Does it mean the step no. 2 should be done on these folders?
Thanks.
|
|
|
|
 |
|
 |
An alternate to that is you can put the DLLs in the GAC
Srivatsan
|
|
|
|
 |
|
 |
Parser Error Message: Value cannot be null.
Parameter name: key
|
|
|
|
 |
|
 |
hi srivatsan
i have done everything as per your instruction.when i opened the .aspx in sharepoint designer 2007 i got the same error you mentioned.after that i add to the aspx file
<![CDATA[<%@ Page Language="C#" MasterPageFile="~masterurl/default.master" AutoEventWireup="true" Inherits="CodeProject.CodeProject" Title="Untitled Page" %>]]>
<asp:content id="Content1" contentplaceholderid="PlaceHolderMain" runat="server" xmlns:asp="#unknown">
but i'm getting a error like this
The Master Page File ~masterurl/default.master cannot be loaded
please help me to resolve this problem.
thanks in advance...
|
|
|
|
 |
|
 |
Please check if the default.master is there in the Master Pages folder in the Sharepoint designer. if not then you have to find where the master page is and point it to that. You may be putting the files in a different place. it is just the master page is not properly hooked up. you correct the path and you should be fine.
Srivatsan
|
|
|
|
 |
|
 |
hai srivatsan thanks for the replay.
i create a new folder called MasterPage and "default.master" file is copied into that folder.and linked this file to master page location.
then i got the master page with the custom application.
but the problem is that it contain losts of warings and errors like "error creating control","error rendering controll" etc...
When i try to run the application i'm getting a error like this.
Server Error in '/' Application.
--------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'Sample.SampleAssembly'.
Source Error:
Line 1: <%@ Page Language="C#" MasterPageFile="MasterPage/default.master" AutoEventWireup="true" CodeBehind="HelloWorld.aspx.cs" Inherits="Sample.SampleAssembly" Title="Untitled Page" %>
Line 2: <asp:content id="Content1" contentplaceholderid="PlaceHolderMain" runat="server" xmlns:asp="#unknown">
Line 3: <asp:button id="Button1" runat="server" onclick="Button1_Click" text="Button" /><asp:textbox>
i have copied the files to bin folder and the assmebly name and namespace are right.(assuming that namespace is the name of the DLL file created and assembly name the one in AssemblyInfo.cs file.
Please help... i'm a beginer in sahrepoint...
|
|
|
|
 |
|
 |
Hi... nice article.
I am a beginner to MOSS.
I tried out your article with a very simple asp.net website and it works great.
But now I am into problems when I try it with a more complex application involving Object Data Source and xsd Dataset i.e. involving database connectivity.
I have a Masterpage and a single web form in the website.
Also I have cs files named UserBLL.cs and UserDAL.xsd in App_Code folder.
On the click of a button I fill the gridview on the page.
I successfully converted the Masterpage and the form into a shareopoint site.But when i run it and click on the button to fill the grid, it gives me below error.
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
MOSS2_XSDTableAdapters.UsersTableAdapter.InitConnection() +56
MOSS2_XSDTableAdapters.UsersTableAdapter.InitAdapter() +342
MOSS2_XSDTableAdapters.UsersTableAdapter.GetAllUsers() +22
MOSS2_NS.UsersBLL.GetUsers() +44
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +308
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +480
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1960
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
Do let me know if any further clarification is required.
Thanks in advance...
Cheers
~$~
|
|
|
|
 |