 |
|
 |
Hello,
Thanks for writing a great article. I've successfully migrated a .NET application to a SharePoint site using your instructions.
Once an app is converted in this way, is there an easy way to roll out the functionality to many SharePoint sites? Maybe through a SharePoint custom feature?
Thanks again.
Regards, Scott
|
|
|
|
 |
|
 |
Hey man, Great article. Just what I was looking for. Though I am not been able to work this thing out for myself. I have created a website called "foo.com" and a class library "BLL" with namespace "namesp"
(1) In Step1 - 1 When you say "make sure you have proper name space" , could you please give me an example (Is it something what I have given : "namesp.BLL") (2) In Step1 - 3 How would you add strong key name . ( I presume you would add snk to the class lib? which I have done) (3) In Step2 - 4 what should be the entry in the web.config. (4) In Step3 - 10 How would you give "Inherits" in my case.
I have followed the steps but I am constantly getting Pasrser error "Could not load type". If I remove the Inherit tag from the webpage then the page is displayed without error but no data on the page!
I would really appriciate if you can reply to these queries. Also like someone mentioned . If you have a mock code then please put it on the site as it would be extemely useful.
Best Regards
|
|
|
|
 |
|
 |
Following are the answers for your questions Question1:
namespace MyCompany.Proj1 { class MyClass { } }
In the above example, the namespace will be MyCompany.Proj1 Question 2: snkey is correct. you have to associate the strong name to the DLL. Your assumption is correct.
Question 3:
<SafeControl Assembly="Microsoft.Practices.EnterpriseLibrary.Common" Namespace="Microsoft.Practices.EnterpriseLibrary.Common" TypeName="*" Safe="True" /> This is the sample entry to be entered in web.config
Question 4:
In the first namepace example, if the code is compiles as DLL with name SampleDLL, then following is the inherits entry Inherits="MyCompany.Proj1.MyClass,SampleDLL"
I will try to put the code in. Thanks for the feedback.
Srivatsan
|
|
|
|
 |
|
 |
Thanks Sri for the quick reply. I have tried this but still no luck. it says try to compile the dll etc. I will try further in next few days and see what happens.
Do you think that for the bespoke developement (e.g. accesing custom database etc) best practice is to develope solutions and features?
Many Thanks
|
|
|
|
 |
|
 |
how can i verify the right namespace and assembly for my project for adding references to my aspx file in a page directive because i got this message: "An error occurred during the processing of . Could not load type 'ExtranetProveedores.NS.ExtranetProveedores.Assembly'. "
thanks !!!
|
|
|
|
 |
|
 |
To verify namespace you can use the .NET disassembler tool. It is usually found in the following location C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\ildasm.exe
If you are using the Web deployment setup, then the setup itself will put the required namespace and assembly in the aspx pages. Use a single assembly so that you can refer the same in al the pages.
Srivatsan
|
|
|
|
 |
|
 |
Hi srivatsan, I've a question. Could you please provide some info?
In Step 3. Where do i find sharepoint site to import my .net web pages?
Thanks Ram
|
|
|
|
 |
|
 |
There are two ways of doing this. But i am going to explain the way in which my article suggests (i.e.) importing the site into the Sharepoitn site using Sharepoint designer. 1) Open Sharepoint designer. 2) Click Open Site in the File menu. 3) Type the URL of the Sharepoint site and click Open
This should open your Sharepoint site in the Sahrepoint designer.
Note: Make sure you have site collection admin access to open the Sharepoint site. Also if you are only having forms authentication, then you cannot open the forms authentication URL in the designer. You have to extend the site to Intranet and use windows authentication.
Srivatsan
|
|
|
|
 |
|
|
 |
|
 |
As you can see in the site that you have mentioned, they have given the pros an cons. The disadvantage of using the iframe is that it is just a view. You are justshowing something in your sharepoint site. you can even open google there. But if you want to use the Sharepoint context, authenticate with sharepoint users ans leverage the capabilities of Sharepoint object model, then you have to use the approach that i have mentioned in my article. It is upto you to decide.
Srivatsan
|
|
|
|
 |
|
 |
Hi mate, thanks for the detailed article. I followed your instructions and it worked first time! It is particularly useful when you have code separation in place i.e. BLL, BOL, DAL in a separate DLL from the website. Not only this but once it is published in SharePoint you still get to edit the style/layout of controls on the pages from within SP Designer without having to re-submit all the DLLs.
I have tried a couple of other approaches but yours is by far the neatest.
Thanks for posting!
|
|
|
|
 |
|
 |
can u help me where can i find sharepoint site ?
|
|
|
|
 |
|
 |
This was a most excellent article! I really liked the level of detail that focused on each step.
|
|
|
|
 |
|
 |
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
|
|
|
|
 |