setting up asp application on hosting provider changing - sql-server

i have never worked on windows iis, asp and mssql but now i am forced to do so.
the plot:
i have an asp mvc application (the exact folder tree copied from the old disabled server) and an mssql backup file (.bak). I have managed to restore the database and i have copied my application folder to httpdocs. BUT still...when i try to access the server it pops lots of errors. i know, lack of knowledge and app setup.
my question, in what order should i start setting up my app (what files, what settings..etc for a complete windows noob); i have no start point, i'm confused, put me on the track please. Any advice will be appreciated, any reference.
Keep in mind that i have advanced knowledge in apache server, php, mysql, html, css, javascript BUT ABSOLUTE ZERO in IIS,mssql,asp :D
PS: it's kind of urgent! and i have to learn as i go.

What kind of errors are you getting?
is an code error? or what?
in my experience, when you get a new windows hosting, or server, sometimes you need to activate .asp pages, since it reads only aspx by default, also, to see the code line errors you need to configure that, because normaly the errors are hidden.
to show errors on a server, you go to control panel, administrative tools, IIS, and then somewhere is the option to show errors on browser.
If you are in a hosting with plesk there is also an option to enable .asp pages and to show errors on browser.

Related

IIS Shared Configuration Webfarm - Error when dynamically updating bindings

First time posting a question so apologies for anything I'm doing wrong.
I have a webfarm of 4 IIS servers running windows server 2016 which uses an azure file storage account for its webfiles. It also save its shared configuration files to the same azure file storage account. This webfarm is then behind an azure load balancer.
Everything works fine, until part of the website code adds an IIS binding. This then causes all the servers to display the error below:
Could not load file or assembly 'EntityFramework,...etc" The parameter
is incorrect. (Image attached for full error).
The only way to resolve this error is to clear the asp.net temporary files from the C drive of all the servers and run IISRESET on each box.
Any ideas?
So this was a mystery but the following changes have resolved the issue. I'm not sure which combination has fixed it, but this might help someone who has a similar issue.
Recreate website in IIS using new App pool.
Removed individual IIS bindings and replaced with wildcard (we had a really old-school system before where we had 100s of binding, maybe one of these was corrupted).
Thanks for your help!

Angularjs - How to debug and log when developing an Office add in

I am developing and Office add in using AngularJS and the adal-angular template provided by Microsoft through the Yeoman Office generator.
After everything was configured correctly I published my manifest.xml to a file share. I then told Excel to trust this file share as an app catalog. I can run the add in just fine, using Excel.
Now, though the add in runs fine, I have no indication of errors or logging messages. If an error occurs, I can't see what actually happen, I can only see the .html file I'm currently loading. This might look like this:
It can't be true that I haven o way of logging, debugging or at least see errors when developing my add in.
As I'm using Gulp to serve the application, I have a command prompt running. It looks like this:
Shouldn't I be able to log in this window, and see errors whenever they occur?
If you want to debug in the Windows desktop versions of Excel/Word/PowerPoint, you can use the IE Developer Tools, which have a good debugger, console, DOM-explorer, etc:
Run the add-in
Go to System32/F12 on your machine
Run F12Chooser.exe
Click Refresh and wait a couple seconds
Choose the process you want to debug from your add-in
The main advantage here is that you can use the native Office clients with this debugging method. For testing in Office Online, Mr.P's answer will work well for you. Note also that the F12 Chooser is available starting in Windows 10.
-Michael Saunders, PM for Office add-ins
I've dealt with the pain of Office add-ins before. It's not a fun place to be. However, I tested out most of the work I was doing in two different ways throughout development:
1) I opened the inspector in Chrome and changed it to mobile view and then set the size to the average add-in size. I know it can change in size, but just to give a general look.
2) I used Office online to actually run my manifest.xml file and then just opened the browser console to see my logging. This was the best way for me to see how things were working. More details of that here.
Hope that helps.

Could someone please provide a walkthrough for deploying a SQL Server / VC# app?

I have just completed (basically) a beginner's database application with SQL Server and Visual C#. I am using Visual C# Express, not the full-scale Visual Studio thing, which apparently makes deploying the application properly a bit more complicated. I've seen where some other people have asked about how to deploy such an application from that IDE, but I'm not able to fully understand and use some of the answers that they've been getting back.
Therefore I must ask how to deploy this application properly, but I must also ask that there be a simple walkthrough given. College doesn't teach much about how to deploy these things, so I'm very newbish at it. Thanks!
I don't know of an automated way to deploy the database. If it's the first time the database is hitting the server, I backup on the source, and restore on the target...simple.
As far as the code, here's what I do:
Publish (right-click, Publish) the code to a local directory (I use C:\Websites\SiteName).
Use and ftp client to promote the output to the server.
Make any necessary adjustments to the web.config to point correctly to your target database.
When and if you need to make changes later, you might want to consider a tool I use for this purpose, BeyondCompare. It can perform a diff between your local files and the target site via FTP, and tell you exactly what you need to deploy to make it work. This won't detect changes in your db, however, though there are plenty of Sql diff tools along the same lines. My general principle is "make the local site work perfectly, and then make the target site just like the local site".
Things to watch for in #3 above are that the target address is right in the connection string, along with whatever security credentials you will need to connect to the db.
HTH.

How to display a SQL Server Report in a .net webpart for SharePoint?

Can anyone describe to me the exact steps in displaying a SQL Server Report hosted on the report server (Remote mode) in a customized webpart? I realize that there is an out of the box web part that comes with SSRS but I want to be able to have already configured webparts that display specific reports available for users to add in their edit site modes. Essentially, the goal is to have a report such as 'Assigned Hours' as a web part itself, and anyone interested in displaying Assigned Hours need only click on Site Actions, Edit Page, Add Web Parts, and choose the Assigned Hours Web Part. No need for configuring a report server url or report path. Also, for certain reasons we would like to continue running the report server in native mode so Integrated mode with SharePoint is not an option.
So, below is a summary of my situation and what I have already tried:
Environment is WSS3.0, Microsoft SQL Server 2005
I have created a .net webpart and am attempting to add an instance of the ReportViewer control to the webpart. I have set to run in remote processing mode and have extended the abstract IReportServerCredentials class to handle the authentication.
I have made sure that the assembly is set to AllowPartiallyTrustedCallers
The project compiles fine. I place the dll in the correct wss bin folder for webparts.
When I try to view the webpart I get the site error message 'That assembly does not allow partially trusted callers.'
I've read things about registering my assembly with SQL Server, which I have tried with the CREATE ASSEMBLY SQL syntax, but that I am getting an sql query error saying that the there is already a reference to another assembly and that it can not find it in the same location.
Honestly, I don't really know enough about SQL Server and reporting services to know if I am close to getting it to work or if I have everything set up completely wrong in the first place. I have made custom webparts before and successfully deployed them to the site, so I know the problems lie in my ignorance of the SSRS and SQL Server. Has anyone else accomplished what I described early before? Thanks in advance!
I suggest using an ASP.NET ReportViewer control in your web part. These controls allow you to customize all parts you mentioned and are fairly easy to use and set-up. The one thing to watch for though with this control would be browser compatibility. Out of the box, it doesn't work too well with Firefox or Chrome. If you wanted though you could attached to the Reporting Services service which would give you the data you want back, then write a template-able control that used that structure to output the data. That option is much more complex, but allows for the format to be defined by the web part, rather than the report.

Winforms: Write app.settings during Setup

I've battled with modifying Configuration settings in the App.config file in the past, and gave up any hope of making it work. Now again, I find myself in the same shoes, but this time determined to sort it out!
The application Im creating is a WindowsForms .NET 3.5 (SP1) app. It is to be used in a closed, networked environment. It is not a SmartClient app, but an "always-connected" one, and transacts over the local network with a central database server.
The app works fine, and now that Im ready to deploy and create the setup files, I must ask 2 very important questions:
How do I (especially!) 'modify' the ConnectionString value from the Setup Wizards? ;and
How/where do/should I encrypt this value?
This is surely something every developer goes thru when moving from development to production, and I would sincerely appreciate any help.
Thank you!
This question provides good information on how to modify the configuration file (in general) during setup.

Resources